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

Allow using the module without specifying an exporter #61

Open
akheron opened this issue Aug 19, 2024 · 2 comments
Open

Allow using the module without specifying an exporter #61

akheron opened this issue Aug 19, 2024 · 2 comments

Comments

@akheron
Copy link

akheron commented Aug 19, 2024

Is your feature request related to a problem? Please describe

For some use cases, it might be beneficial to use this module even without specifying an exporter at all, or "exporting" the traces by printing/logging.

Use cases:

  • Running the same code in different environments (local/test/staging/production) is useful, even if some of the environments don't have a service to export the traces to. If the otel module is not loaded in other environments, a bug might only be discovered in production!
  • Enabling the otel module might be useful even if the traces are not exported anywhere. By propagating the context, the trace id and parent span id can still be logged in all services to enable log correlation.

Describe the solution you'd like

Don't require an otel_exporter section at all, or allow configuring a printing/logging exporter in otel_exporter section.

Describe alternatives you've considered

Alternatively, only require otel_exporter section if tracing on; is used in a location block. tracing off; would not require it. This is the "worst" option in my opinion, but would also be a workaround to allow enabling the module.

Additional context

None

@p-pautov
Copy link
Contributor

You should be able to use module without otel_exporter today, if there are no explicit otel_trace directives, which is quite close to the "worst" alternative above. Another "creative" workaround is to use dummy exporter (exporter errors do not block traffic processing) and/or set "forever" interval.

However, running without exporter or even with "logging exporter" won't be "the same code", as the bulk of module's logic is dedicated to gRPC export.

There might be some value in "logging exporter", but it seems rather limited, given otelcol project provides binaries for many platforms.

@akheron
Copy link
Author

akheron commented Aug 21, 2024

You should be able to use module without otel_exporter today, if there are no explicit otel_trace directives, which is quite close to the "worst" alternative above.

Thanks! I guess this suffices as a workaround for now.

However, running without exporter or even with "logging exporter" won't be "the same code", as the bulk of module's logic is dedicated to gRPC export.

Fair point.

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

No branches or pull requests

2 participants