@@ -69,7 +69,7 @@ func (or *ObsReport) StartTracesOp(ctx context.Context) context.Context {
69
69
// EndTracesOp completes the export operation that was started with StartTracesOp.
70
70
func (or * ObsReport ) EndTracesOp (ctx context.Context , numSpans int , err error ) {
71
71
numSent , numFailedToSend := toNumItems (numSpans , err )
72
- or .recordMetrics (noCancellationContext { Context : ctx } , component .DataTypeTraces , numSent , numFailedToSend )
72
+ or .recordMetrics (context . WithoutCancel ( ctx ) , component .DataTypeTraces , numSent , numFailedToSend )
73
73
endSpan (ctx , err , numSent , numFailedToSend , obsmetrics .SentSpansKey , obsmetrics .FailedToSendSpansKey )
74
74
}
75
75
@@ -84,7 +84,7 @@ func (or *ObsReport) StartMetricsOp(ctx context.Context) context.Context {
84
84
// StartMetricsOp.
85
85
func (or * ObsReport ) EndMetricsOp (ctx context.Context , numMetricPoints int , err error ) {
86
86
numSent , numFailedToSend := toNumItems (numMetricPoints , err )
87
- or .recordMetrics (noCancellationContext { Context : ctx } , component .DataTypeMetrics , numSent , numFailedToSend )
87
+ or .recordMetrics (context . WithoutCancel ( ctx ) , component .DataTypeMetrics , numSent , numFailedToSend )
88
88
endSpan (ctx , err , numSent , numFailedToSend , obsmetrics .SentMetricPointsKey , obsmetrics .FailedToSendMetricPointsKey )
89
89
}
90
90
@@ -98,7 +98,7 @@ func (or *ObsReport) StartLogsOp(ctx context.Context) context.Context {
98
98
// EndLogsOp completes the export operation that was started with StartLogsOp.
99
99
func (or * ObsReport ) EndLogsOp (ctx context.Context , numLogRecords int , err error ) {
100
100
numSent , numFailedToSend := toNumItems (numLogRecords , err )
101
- or .recordMetrics (noCancellationContext { Context : ctx } , component .DataTypeLogs , numSent , numFailedToSend )
101
+ or .recordMetrics (context . WithoutCancel ( ctx ) , component .DataTypeLogs , numSent , numFailedToSend )
102
102
endSpan (ctx , err , numSent , numFailedToSend , obsmetrics .SentLogRecordsKey , obsmetrics .FailedToSendLogRecordsKey )
103
103
}
104
104
0 commit comments