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

advice for dealing with tracing where the export endpoint might not be present #1281

Open
rbtcollins opened this issue Oct 2, 2023 · 1 comment
Labels
A-common Area:common issues that not related to specific pillar documentation/examples Improvements or additions to documentation or examples help wanted Good for taking. Extra help will be provided by maintainers/approvers

Comments

@rbtcollins
Copy link
Contributor

rbtcollins commented Oct 2, 2023

So, when the export endpoint isn't present, which happens e.g:

  • during development, if e.g. jaeger isn't running
  • during testing - e.g. CI - if no tracing stack is present

then running tracing enabled code results in:

OpenTelemetry trace error occurred. Exporter otlp encountered the following error(s): the grpc server returns error (The service is currently unavailable): , detailed error message: error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061)  

when the tracer provider is shutdown (which is desirable in general to ensure that the spans for short tools are exported), (or for longer tasks/servers, when the internal buffer is filled, this happens without the shutdown being invoked at all.

which is understandable - the trace can't be exported, and certainly in prod a case can be made that failing silently is wrong.

However, I'm finding - in multiple contexts: at work in our microservices, in rustup when instrumenting its internals, and in other personal projects - that this works quite poorly. We end up with terabytes of logs messages, saturating our logging system when the telemetry export stack is down, or unit tests fail because extra text has been written to std channels.

Does anyone else run into this problem? Is there some feature to disable the error reporting, or replace it with a metric that can be used to detect the situation instead of spamming log output?

@cijothomas
Copy link
Member

Can you disable/not-add OTLP Exporters in development env, right?

@hdost hdost added documentation/examples Improvements or additions to documentation or examples A-common Area:common issues that not related to specific pillar help wanted Good for taking. Extra help will be provided by maintainers/approvers labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-common Area:common issues that not related to specific pillar documentation/examples Improvements or additions to documentation or examples help wanted Good for taking. Extra help will be provided by maintainers/approvers
Projects
None yet
Development

No branches or pull requests

3 participants