Skip to content

Conversation

@laurit
Copy link
Contributor

@laurit laurit commented Sep 1, 2025

When an application using the agent also uses the sdk we shouldn't let the agent collect traces from the sdk.

@laurit laurit requested a review from a team as a code owner September 1, 2025 15:48
@SylvainJuge
Copy link
Contributor

@laurit can you elaborate a bit on why this is needed ?

My understanding so far was that when an application was using the API/SDK for manual instrumentation then the agent would bridge it to its own internal SDK, is that still the case ?

@laurit
Copy link
Contributor Author

laurit commented Sep 2, 2025

My understanding so far was that when an application was using the API/SDK for manual instrumentation then the agent would bridge it to its own internal SDK, is that still the case ?

yes, this is how it is bridged.

Comment on lines +60 to +63
public static boolean methodEnter(@Advice.Argument(0) Runnable runnable) {
InstrumentationUtil.suppressInstrumentation(runnable);
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the return value needed here?

Suggested change
public static boolean methodEnter(@Advice.Argument(0) Runnable runnable) {
InstrumentationUtil.suppressInstrumentation(runnable);
return true;
}
public static void methodEnter(@Advice.Argument(0) Runnable runnable) {
InstrumentationUtil.suppressInstrumentation(runnable);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is needed

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

LGTM

@laurit laurit merged commit 3998e96 into open-telemetry:main Sep 3, 2025
89 checks passed
@laurit laurit deleted the instrumentation-suppression branch September 3, 2025 05:28
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.

4 participants