Skip to content

Conversation

@CagriYonca
Copy link
Contributor

@CagriYonca CagriYonca commented Nov 5, 2025

tracing_is_off function is also widely used in almost every instrumentation and it only returns whether the tracer is ready to record a new span or not. As I already explained above, we already have this information in the tracer, so that by combining these two functions into get_tracer_tuple function, we're getting rid of 1 get_current_span call and functionality of tracing_is_off function since we can directly check if the tracer in the instrumentation is False or not.

  • get_active_tracer and tracing_is_off functions has been removed
  • adapted instrumentations to the new get_tracer_tuple function

@CagriYonca CagriYonca self-assigned this Nov 5, 2025
@CagriYonca CagriYonca requested a review from a team as a code owner November 5, 2025 16:28
Copy link
Contributor

@GSVarsha GSVarsha left a comment

Choose a reason for hiding this comment

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

We shouldn't return if the tracer is inactive for server spans like wsgi, sanic, etc because those would (mostly) be the first spans (entry) starting the trace.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@CagriYonca CagriYonca marked this pull request as draft November 18, 2025 09:34
@CagriYonca CagriYonca added the do NOT merge Depends on another PR or WIP label Nov 18, 2025
@CagriYonca CagriYonca changed the title fix: Improved getting active tracer and current span mechanism [INSTA-47091] fix: Improved getting active tracer and current span mechanism Nov 21, 2025
@CagriYonca CagriYonca force-pushed the active-tracer branch 2 times, most recently from 6ebabac to e5e52b7 Compare November 24, 2025 11:21
Signed-off-by: Cagri Yonca <cagri@ibm.com>
@CagriYonca CagriYonca marked this pull request as ready for review November 24, 2025 11:38
@CagriYonca CagriYonca removed the do NOT merge Depends on another PR or WIP label Nov 24, 2025
@CagriYonca CagriYonca requested a review from pvital November 24, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants