Skip to content

Fix for "IllegalStateException when OTEL_SDK_DISABLED is set to true" - #2993

Merged
laurit merged 1 commit into
signalfx:mainfrom
robsunday:opamp-fix-for-disabled-sdk
Aug 11, 2026
Merged

Fix for "IllegalStateException when OTEL_SDK_DISABLED is set to true"#2993
laurit merged 1 commit into
signalfx:mainfrom
robsunday:opamp-fix-for-disabled-sdk

Conversation

@robsunday

Copy link
Copy Markdown
Contributor

Fixes #2989

@robsunday
robsunday requested review from a team as code owners August 7, 2026 12:21
@robsunday robsunday changed the title NoopSnapshotProfilingSpanProcessor instance set as default value for supplier Fix for "IllegalStateException when OTEL_SDK_DISABLED is set to true" Aug 7, 2026

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since there have been additional changes to the snapshot profiler supervisor code since the release, it's quite unclear where the actual fix is in this changeset. There's also no hints from any tests, so I can't tell.

Comment on lines +22 to 29
public interface SnapshotProfilingSpanProcessor extends SpanProcessor {
OptionalConfigurableSupplier<SnapshotProfilingSpanProcessor> SUPPLIER =
new OptionalConfigurableSupplier<>(new NoopSnapshotProfilingSpanProcessor());

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
void setEnabled(boolean enabled);

public boolean isEnabled() {
return enabled;
}
boolean isEnabled();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Certainly doesn't have to be in this PR, but there's room for this to be a more generic "span processor which can be enabled/disabled". Maybe EnableableSpanProcessor but that doesn't really flow off the tongue....maybe ToggleableSpanProcessor but I dunno. This could also be an upstream addition perhaps. Just thinking out loud.

Comment on lines +23 to +24
OptionalConfigurableSupplier<SnapshotProfilingSpanProcessor> SUPPLIER =
new OptionalConfigurableSupplier<>(new NoopSnapshotProfilingSpanProcessor());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh this is the actual fix.

@laurit
laurit merged commit 5af0a27 into signalfx:main Aug 11, 2026
28 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IllegalStateException when OTEL_SDK_DISABLED is set to true

3 participants