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

Q: Way to ignore healthcheck traces when using automatic tracer across all languages? #173

Open
naseemkullah opened this issue Jul 4, 2019 · 12 comments
Labels
area:configuration Related to configuring the SDK area:sampling Related to trace sampling area:sdk Related to the SDK triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor

Comments

@naseemkullah
Copy link
Member

naseemkullah commented Jul 4, 2019

Hi,

Will there be a way to ignore specific endpoints such as health checks when using the automatic tracer?

@z1c0
Copy link
Contributor

z1c0 commented Jul 9, 2019

Hi,
not sure I understand the question correctly. Do you think of a way to exclude e.g. specific URLs? Why only for automatic tracer?

@naseemkullah
Copy link
Member Author

Yes it would be nice to exclude specific URLs in the automatic tracer, and also not in the automatic tracer, but just want to make sure this exclusion feature is configurable in the automatic tracer.

@discostu105
Copy link
Member

discostu105 commented Jul 22, 2019

I agree that URL exclusions would make sense. We currently have that feature in Dynatrace for exactly that purpose.

In OpenTelementry, the broader question is:

At what level does such configuration need to be applied?

  • API (config is exposed via API level)
  • Tracer-impl (every tracer-implementation can have it's own config system)
    • Should the OTel SDK have such a config system?
  • Exporter (it's up to the exporter to have a config)

I think config should not be exposed via API. Would add much more complexity. With healthchecks specifically however, it could make sense that a user gives a "hint" about "unimportant" requests (such as healthchecks), so that the Tracer-impl can decide on it's own to exclude them or not.

@mtwo
Copy link
Member

mtwo commented Jul 22, 2019

+1 to this issue. Some OpenCensus implementations had a list of paths that wouldn't get sampled, which were often used to ensure that health checks, exporters, and other telemetry providers weren't generating traces. This was incredibly useful.

@iredelmeier iredelmeier added the needs discussion Need more information before all suitable labels can be applied label Jul 30, 2019
@bogdandrutu bogdandrutu modified the milestones: Alpha v0.3, Alpha v0.4 Sep 30, 2019
@tedsuo
Copy link
Contributor

tedsuo commented Dec 4, 2019

This feels like an SDK detail, but it would be great if there was a way to do this externally: a config file for example.

@naseemkullah
Copy link
Member Author

open-telemetry/opentelemetry-js#585 might be of interest

@pavolloffay
Copy link
Member

Has been any decision made on this? I have started looking into this in the context of open-telemetry/opentelemetry-java-instrumentation#1060

From the thread I cannot figure out how the skip URL pattern should work. There are two approaches

  1. exclude a span from being created
  2. create non-recording (not sampled) span, but respect upstream sampling decision

The first approach might result in broken traces (e.g. a health check might have an upstream parent or it calls any downstream service/instrumentation). The second approach is more consistent.

Is there a way to instruct the tracer to create non-recording span?

@pavolloffay
Copy link
Member

from @iNikem

I think the right way is to use one of the factory methods on io.opentelemetry.trace.DefaultSpan.

So there is a way how to create non-recording span. The DefaultSpan has invalid context with zero span ID. I don't like two things about this:

  • two code paths for creating a span
  • invalid context with zero IDs. I would prefer a valid non-sampled context.

In OpenTracing there was sampling.priority=integer tag that span builder could use for sampling decision. This way multiple code paths were avoided.

@anuraaga
Copy link
Contributor

I guess we could implement a custom Sampler? It could do ParentOrElse for non-matched paths and ParentOnly for marched paths I think.

DefaultSpan is going to be renamed to something like PropagatorOnlySpan so it'll become less appropriate, or we need to otherwise chime in on the spec issue that we have a valid use case here.

@directionless
Copy link

Forgive me if this is not in the right place, but I think I have a related usecase... I'm starting to use opentelemetry, and I've noticed that some of my libraries (go-redis) create traces. I can see how this is powerful, but right now, they're just clutter. So I'd love a reasonably low-level way to exclude them. I imagine by name, but I'm a bit fuzzy on all the nomenclature.

I think the best I can do right now, is configs in my exporter, but that feels very cumbersome.

TuckTuckFloof pushed a commit to TuckTuckFloof/opentelemetry-specification that referenced this issue Oct 15, 2020
@iNikem
Copy link
Contributor

iNikem commented Aug 3, 2021

@carlosalberto I think this is a duplicate of #1597 and should be closed.

@xvilo
Copy link

xvilo commented Dec 14, 2023

@iNikem I want to add that #1597 is comparable, but in this case quite different. They are the other way around for each other and both valid use cases.

Anyway, do we already have a solution to this issue?

@dyladan dyladan added triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor area:sampling Related to trace sampling area:configuration Related to configuring the SDK and removed needs discussion Need more information before all suitable labels can be applied release:after-ga Not required before GA release, and not going to work on before GA spec:trace Related to the specification/trace directory labels Mar 29, 2024
@dyladan dyladan removed this from the v0.6 milestone Mar 29, 2024
@austinlparker austinlparker moved this to Spec Icebox in 🔭 Main Backlog Apr 16, 2024
@austinlparker austinlparker moved this from Spec - Accepted to Spec - Priority Backlog in 🔭 Main Backlog Apr 16, 2024
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 21, 2024
… tracing (open-telemetry#173)

[Semantic conventions for messaging systems for tracing](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/messaging.md) are available, but are in an experimental state. A [workgroup focusing on messaging semantic conventions](open-telemetry/community#819) will work on bringing the existing semantic conventions for messaging to a stable state. The workgroup meets on **Thursdays at 8AM PST**.

This documents proposes a scope for an initial stable version of messaging semantic conventions, as well as a roadmap.  It should serve as a starting point for initial discussions in the workgroup and, once agreed on, define the further agenda of the workgroup.
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 23, 2024
… tracing (open-telemetry#173)

[Semantic conventions for messaging systems for tracing](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/messaging.md) are available, but are in an experimental state. A [workgroup focusing on messaging semantic conventions](open-telemetry/community#819) will work on bringing the existing semantic conventions for messaging to a stable state. The workgroup meets on **Thursdays at 8AM PST**.

This documents proposes a scope for an initial stable version of messaging semantic conventions, as well as a roadmap.  It should serve as a starting point for initial discussions in the workgroup and, once agreed on, define the further agenda of the workgroup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Related to configuring the SDK area:sampling Related to trace sampling area:sdk Related to the SDK triage:accepted:needs-sponsor Ready to be implemented, but does not yet have a specification sponsor
Projects
Status: Spec - Priority Backlog
Development

No branches or pull requests