Skip to content

Commit f7ec4c1

Browse files
author
Daisuke Kanda
committed
udpate telemetry change
Signed-off-by: Daisuke Kanda <daisuke.kanda@datachain.jp>
1 parent a02d1fb commit f7ec4c1

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

core/service_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"github.com/hyperledger-labs/yui-relayer/core"
2121
"github.com/hyperledger-labs/yui-relayer/log"
2222
"github.com/hyperledger-labs/yui-relayer/provers/mock"
23-
"github.com/hyperledger-labs/yui-relayer/metrics"
2423
"github.com/hyperledger-labs/yui-relayer/chains/tendermint"
24+
"github.com/hyperledger-labs/yui-relayer/internal/telemetry"
2525
)
2626

2727
type NaiveStrategyWrap struct {
@@ -138,7 +138,7 @@ func NewMockProvableChain(
138138
height := ctx.Height().(clienttypes.Height)
139139
return &chantypes.QueryNextSequenceReceiveResponse{ 1, []byte{}, height }, nil
140140
}).AnyTimes()
141-
chain.EXPECT().QueryUnfinalizedRelayPackets(gomock.Any(), gomock.Any()).Return(unfinalizedRelayPackets, nil)
141+
chain.EXPECT().QueryUnfinalizedRelayPackets(gomock.Any(), gomock.Any()).Return(unfinalizedRelayPackets, nil).AnyTimes()
142142
chain.EXPECT().QueryUnreceivedPackets(gomock.Any(), gomock.Any()).Return(unreceivedPackets, nil).AnyTimes()
143143
chain.EXPECT().QueryUnreceivedAcknowledgements(gomock.Any(), gomock.Any()).Return([]uint64{}, nil).AnyTimes()
144144
chain.EXPECT().QueryUnfinalizedRelayAcknowledgements(gomock.Any(), gomock.Any()).Return([]*core.PacketInfo{}, nil).AnyTimes()
@@ -284,8 +284,8 @@ func TestServe(t *testing.T) {
284284
}
285285

286286
func testServe(t *testing.T, tc testCase) {
287-
log.InitLoggerWithWriter("debug", "text", os.Stdout)
288-
metrics.InitializeMetrics(metrics.ExporterNull{})
287+
log.InitLoggerWithWriter("debug", "text", os.Stdout, false)
288+
telemetry.InitializeMetrics()
289289

290290
srcLatestHeader := mocktypes.Header{
291291
Height: clienttypes.NewHeight(1, 100),

go.mod

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ require (
2222
github.com/spf13/cobra v1.8.0
2323
github.com/spf13/pflag v1.0.5
2424
github.com/spf13/viper v1.18.2
25+
github.com/stretchr/testify v1.10.0
2526
go.opentelemetry.io/contrib/bridges/otelslog v0.10.0
27+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0
2628
go.opentelemetry.io/otel v1.35.0
2729
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0
2830
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0
2931
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0
30-
github.com/stretchr/testify v1.10.0
31-
go.opentelemetry.io/otel v1.33.0
3232
go.opentelemetry.io/otel/exporters/prometheus v0.55.0
3333
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.11.0
3434
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0
@@ -39,15 +39,10 @@ require (
3939
go.opentelemetry.io/otel/sdk/log v0.11.0
4040
go.opentelemetry.io/otel/sdk/metric v1.35.0
4141
go.opentelemetry.io/otel/trace v1.35.0
42+
go.uber.org/mock v0.5.0
4243
golang.org/x/sync v0.11.0
4344
golang.org/x/sys v0.30.0
4445
google.golang.org/grpc v1.71.0
45-
go.opentelemetry.io/otel/metric v1.33.0
46-
go.opentelemetry.io/otel/sdk/metric v1.33.0
47-
go.uber.org/mock v0.5.0
48-
golang.org/x/sync v0.10.0
49-
golang.org/x/sys v0.28.0
50-
google.golang.org/grpc v1.62.0
5146
gopkg.in/yaml.v2 v2.4.0
5247
)
5348

@@ -195,23 +190,15 @@ require (
195190
go.opencensus.io v0.24.0 // indirect
196191
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
197192
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
198-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
199193
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
200194
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
201195
go.uber.org/multierr v1.10.0 // indirect
202196
golang.org/x/crypto v0.33.0 // indirect
203197
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
204-
<<<<<<< HEAD
205198
golang.org/x/net v0.35.0 // indirect
206199
golang.org/x/oauth2 v0.26.0 // indirect
207200
golang.org/x/term v0.29.0 // indirect
208201
golang.org/x/text v0.22.0 // indirect
209-
=======
210-
golang.org/x/net v0.32.0 // indirect
211-
golang.org/x/oauth2 v0.24.0 // indirect
212-
golang.org/x/term v0.27.0 // indirect
213-
golang.org/x/text v0.21.0 // indirect
214-
>>>>>>> 4be53bc (update ibc-mock-client)
215202
golang.org/x/time v0.5.0 // indirect
216203
google.golang.org/api v0.162.0 // indirect
217204
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect

0 commit comments

Comments
 (0)