Skip to content

Commit

Permalink
Add logging for sampler added to tracerprovider (#4749)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishweshbankwar committed Aug 8, 2023
1 parent eb9c30a commit b0ab8d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/OpenTelemetry/Trace/TracerProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ internal sealed class TracerProviderSdk : TracerProvider
this.Resource = resourceBuilder.Build();

this.sampler = state.Sampler ?? new ParentBasedSampler(new AlwaysOnSampler());
OpenTelemetrySdkEventSource.Log.TracerProviderSdkEvent($"Sampler added = \"{this.sampler.GetType()}\".");

this.supportLegacyActivity = state.LegacyActivityOperationNames.Count > 0;

bool legacyActivityWildcardMode = false;
Expand Down

0 comments on commit b0ab8d5

Please sign in to comment.