-
Notifications
You must be signed in to change notification settings - Fork 819
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
Avoid infinity loop when exporter use http to send spans #332
Comments
We have a specific header with Opencensus to avoid this issue: https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-instrumentation-http/src/http.ts#L46 |
should we set |
closes open-telemetry#332 Signed-off-by: Olivier Albertini <[email protected]>
closes open-telemetry#332 Signed-off-by: Olivier Albertini <[email protected]>
@OlivierAlbertini i'm good with the header you set in the PR |
closes open-telemetry#332 Signed-off-by: Olivier Albertini <[email protected]>
* fix: dont trace ourselves closes #332 Signed-off-by: Olivier Albertini <[email protected]> * fix: add mayurkale22 recommendations Signed-off-by: Olivier Albertini <[email protected]>
This still seems to be an issue and caused our platform to log 50M+ spans in two weeks with very little traffic on the platform. |
@ljcremer we are working on a new way to prevent these infinite loops by allowing exporters to set a context property during export which disables tracing. A quick glance at the exporter code looks like the header to disable tracing is set properly in the exporter, but I'll make sure the http/https plugins are properly respecting it. |
@dyladan Looks like the Python SDK actually sets the context before the exporter is run, which is nice because the exporters don't need to do anything. It does the same in the SpanProcessors for traces: |
Yes I meant span processor. I often say "Exporter" to refer to the whole export pipeline or process. |
* Error for mismatching env variables Signed-off-by: Yevgeny Petukhov <[email protected]> * Warning instead of error Signed-off-by: Yevgeny Petukhov <[email protected]> * Warning text and var name are fixed Signed-off-by: Yevgeny Petukhov <[email protected]> * fixup! Warning text and var name are fixed Signed-off-by: Yevgeny Petukhov <[email protected]> * fixup! Warning text and var name are fixed Signed-off-by: Yevgeny Petukhov <[email protected]> * Move check to _validateEnv method and call it at initTracer Signed-off-by: Yevgeny Petukhov <[email protected]> * fixup! Move check to _validateEnv method and call it at initTracer Signed-off-by: Yevgeny Petukhov <[email protected]>
what is the solution for this? Fix!? |
current solution is that SpanProcessor/exporter set the suppressTracing marker on context which causes that tracer doesn't create a span. There might be other implementations of Exporters/SpanProcessors/Tracers in the wild which are not covered by the SDK implementation so they should adapt this approach. |
Is your feature request related to a problem? Please describe.
Right now, I must use this config to avoid infinity loop:
Describe the solution you'd like
We should handle this internally. Perhaps we could use a specific header that will be handled by http plugin for ignoring outgoing request with that header?
The text was updated successfully, but these errors were encountered: