Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POTEL 39 - Use RECORD_ONLY sampling decision if performance is disabled #3659

Merged
merged 5 commits into from
Sep 3, 2024
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Add OpenTelemetry span data to Sentry span ([#3593](https://github.com/getsentry/sentry-java/pull/3593))
- No longer selectively copy OpenTelemetry attributes to Sentry spans / transactions `data` ([#3663](https://github.com/getsentry/sentry-java/pull/3663))
- Remove `PROCESS_COMMAND_ARGS` (`process.command_args`) OpenTelemetry span attribute as it can be very large ([#3664](https://github.com/getsentry/sentry-java/pull/3664))
- Use RECORD_ONLY sampling decision if performance is disabled ([#3659](https://github.com/getsentry/sentry-java/pull/3659))
- Also fix check whether Performance is enabled when making a sampling decision in the OpenTelemetry sampler

### Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ public SamplingResult shouldSample(

private @NotNull SamplingResult handleRootOtelSpan(
final @NotNull String traceId, final @NotNull Context parentContext) {
if (!scopes.getOptions().isTraceSampling()) {
// TODO [POTEL] should this return RECORD_ONLY to allow tracing without performance
return SamplingResult.create(SamplingDecision.DROP);
if (!scopes.getOptions().isTracingEnabled()) {
return SamplingResult.create(SamplingDecision.RECORD_ONLY);
}
@Nullable Baggage baggage = null;
@Nullable
Expand Down
Loading