Skip to content

Commit 95ddc6f

Browse files
committed
fix lint
1 parent 1541be9 commit 95ddc6f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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.

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)