Skip to content

Commit

Permalink
last working but multiple message
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed May 17, 2024
1 parent 608ed35 commit 02b5795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diracx-routers/src/diracx/routers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
)
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
from opentelemetry.instrumentation.logging import LoggingInstrumentor
from opentelemetry.instrumentation.logging.constants import DEFAULT_LOGGING_FORMAT

# from opentelemetry.instrumentation.logging.constants import DEFAULT_LOGGING_FORMAT
# from opentelemetry.sdk._logs.export import ConsoleLogExporter
from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
Expand Down Expand Up @@ -109,7 +109,7 @@ def instrument_otel(app: ASGIApp, app_name: str, log_correlation: bool = True) -

# # override logger format which with trace id and span id
if log_correlation:
LoggingInstrumentor().instrument(set_logging_format=False)
LoggingInstrumentor().instrument(set_logging_format=True)
logger_provider = LoggerProvider(resource=resource)
_logs.set_logger_provider(logger_provider)

Expand Down

0 comments on commit 02b5795

Please sign in to comment.