Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/metrics/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func MakeListener(config Config, extensionManager *extension.ExtensionManager) L
// Agent instead of using this "discovery" implementation.
if extensionManager.IsExtensionRunning() {
var err error
if statsdClient, err = statsd.New("127.0.0.1:8125"); err != nil {
if statsdClient, err = statsd.New("127.0.0.1:8125", statsd.WithoutTelemetry()); err != nil {
statsdClient = nil // force nil if an error occurred during statsd client init
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/trace/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (l *Listener) HandlerFinished(ctx context.Context, err error) {
}
}

tracer.Stop()
tracer.Flush()
Copy link

Copilot AI Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider the order of operations: calling tracer.Stop() before tracer.Flush() may prevent pending traces from being sent. The typical pattern is to flush first, then stop to ensure all data is transmitted before cleanup.

Suggested change
tracer.Flush()
tracer.Flush()
tracer.Stop()

Copilot uses AI. Check for mistakes.
}

Expand Down
Loading