Skip to content

Commit 5d6f316

Browse files
committed
fix lint
1 parent 1541be9 commit 5d6f316

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

exporters/otlp/otlptrace/otlptracegrpc/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ func newClient(opts ...Option) *client {
9393
return c
9494
}
9595

96-
var exporterID atomic.Uint64
96+
var exporterID atomic.Int64
9797

9898
// nextExporterID returns an identifier for this otlp grpc trace exporter,
9999
// starting with 0 and incrementing by 1 each time it is called.
100100
func nextExporterID() int64 {
101-
return int64(exporterID.Add(1) - 1)
101+
return exporterID.Add(1) - 1
102102
}
103103

104104
// configureSelfObservability configures metrics for the batch span processor.

exporters/otlp/otlptrace/otlptracegrpc/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/stretchr/testify v1.10.0
88
go.opentelemetry.io/otel v1.34.0
99
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0
10+
go.opentelemetry.io/otel/metric v1.34.0
1011
go.opentelemetry.io/otel/sdk v1.34.0
1112
go.opentelemetry.io/otel/trace v1.34.0
1213
go.opentelemetry.io/proto/otlp v1.5.0
@@ -24,7 +25,6 @@ require (
2425
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect
2526
github.com/pmezard/go-difflib v1.0.0 // indirect
2627
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
27-
go.opentelemetry.io/otel/metric v1.34.0 // indirect
2828
golang.org/x/net v0.34.0 // indirect
2929
golang.org/x/sys v0.29.0 // indirect
3030
golang.org/x/text v0.21.0 // indirect

sdk/trace/batch_span_processor.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorO
135135
return bsp
136136
}
137137

138-
var processorID atomic.Uint64
138+
var processorID atomic.Int64
139139

140140
// nextProcessorID returns an identifier for this batch span processor,
141141
// starting with 0 and incrementing by 1 each time it is called.
142142
func nextProcessorID() int64 {
143-
return int64(processorID.Add(1) - 1)
143+
return processorID.Add(1) - 1
144144
}
145145

146146
// configureSelfObservability configures metrics for the batch span processor.

sdk/trace/provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
134134
return tp
135135
}
136136

137-
var providerID atomic.Uint64
137+
var providerID atomic.Int64
138138

139139
// nextProviderID returns an identifier for this tracerprovider,
140140
// starting with 0 and incrementing by 1 each time it is called.
141141
func nextProviderID() int64 {
142-
return int64(providerID.Add(1) - 1)
142+
return providerID.Add(1) - 1
143143
}
144144

145145
func (p *TracerProvider) configureSelfObservability() {

0 commit comments

Comments
 (0)