Skip to content

Commit

Permalink
fix nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelchcki committed Nov 23, 2023
1 parent a1f27e0 commit f6a1336
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ddtrace/tracer/spancontext.go
Expand Up @@ -468,8 +468,11 @@ func (t *trace) finishedOne(s *span) {
// TODO: (Support MetricKindDist) Re-enable these when we actually support `MetricKindDist`
//telemetry.GlobalClient.Record(telemetry.NamespaceTracers, telemetry.MetricKindDist, "trace_partial_flush.spans_closed", float64(len(finishedSpans)), nil, true)
//telemetry.GlobalClient.Record(telemetry.NamespaceTracers, telemetry.MetricKindDist, "trace_partial_flush.spans_remaining", float64(len(leftoverSpans)), nil, true)
priority = t.priority.Load()
if priority != nil {
finishedSpans[0].setMetric(keySamplingPriority, *priority)
}

finishedSpans[0].setMetric(keySamplingPriority, *t.priority.Load())
if s != t.spans[0] {
// Make sure the first span in the chunk has the trace-level tags
t.setTraceTags(finishedSpans[0], tr)
Expand Down

0 comments on commit f6a1336

Please sign in to comment.