Skip to content

refactor(otel): Accept builder, remove custom sampling#436

Merged
ayushiahjolia merged 1 commit into
mainfrom
otel-plugin
Jun 9, 2026
Merged

refactor(otel): Accept builder, remove custom sampling#436
ayushiahjolia merged 1 commit into
mainfrom
otel-plugin

Conversation

@ayushiahjolia

@ayushiahjolia ayushiahjolia commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#435

Description

  • Plugin constructor now accepts SdkTracerProviderBuilder instead of TracerProvider + DeterministicIdGenerator. The plugin creates and manages the ID generator internally.
  • Removed SamplingUtil and samplingRate parameter. Sampling is now handled by the OTel SDK's built-in Sampler (e.g., TraceIdRatioBased). Since trace IDs are deterministic, ratio-based sampling gives consistent per-execution decisions automatically.

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? Updated existing tests.

Integration Tests

Have integration tests been written for these changes? N/A

Examples

Has a new example been added for the change? (if applicable) N/A

@ayushiahjolia ayushiahjolia changed the title refactor(otel): Accept builder, remove custom sampling, fix scope leaks refactor(otel): Accept builder, remove custom sampling Jun 8, 2026
@ayushiahjolia ayushiahjolia marked this pull request as ready for review June 8, 2026 21:33
@ayushiahjolia ayushiahjolia requested a review from a team June 8, 2026 21:33
@ayushiahjolia ayushiahjolia merged commit 118865a into main Jun 9, 2026
12 checks passed
@ayushiahjolia ayushiahjolia deleted the otel-plugin branch June 9, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants