mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 17:41:08 +00:00
Only enable OTLP exporter when configured
This wasn't a problem in the past, since we only enabled automatic instrumentation when this was set up, but it does cause errors when trying to add manual instrumentation.
This commit is contained in:
parent
e9d08e7424
commit
ef64fedbd9
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ if settings.OTEL_EXPORTER_CONSOLE:
|
|||
trace.get_tracer_provider().add_span_processor(
|
||||
BatchSpanProcessor(ConsoleSpanExporter())
|
||||
)
|
||||
else:
|
||||
elif settings.OTEL_EXPORTER_OTLP_ENDPOINT:
|
||||
trace.get_tracer_provider().add_span_processor(
|
||||
BatchSpanProcessor(OTLPSpanExporter())
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue