Fix trace client update (#5480)

This commit is contained in:
Joe Kralicky 2025-02-12 19:47:17 -05:00 committed by GitHub
parent 229ef72e58
commit 3043e98fab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 6 deletions

View file

@ -30,6 +30,10 @@ var (
type SyncClient interface {
otlptrace.Client
// Update safely replaces the current trace client with the one provided.
// The new client must be unstarted. The old client (if any) will be stopped.
//
// This function is NOT reentrant; callers must use appropriate locking.
Update(ctx context.Context, newClient otlptrace.Client) error
}