Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions diracx-routers/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ dependencies = [
"joserfc",
"pydantic >=2.10",
"uvicorn",
"opentelemetry-api",
"opentelemetry-exporter-otlp",
"opentelemetry-instrumentation-fastapi",
"opentelemetry-instrumentation-logging",
"opentelemetry-sdk",
"opentelemetry-api>=1.40.0",
"opentelemetry-exporter-otlp>=1.40.0",
"opentelemetry-instrumentation-fastapi>=0.61b0",
"opentelemetry-instrumentation-logging>=0.61b0",
"opentelemetry-sdk>=1.40.0",
]
dynamic = ["version"]

Expand Down
7 changes: 6 additions & 1 deletion diracx-routers/src/diracx/routers/otel.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ def instrument_otel(app: FastAPI) -> None:
)
logger_provider.add_log_record_processor(BatchLogRecordProcessor(otlp_exporter))
handler = LoggingHandler(level=logging.DEBUG, logger_provider=logger_provider)
handler.setFormatter(logging.Formatter(DEFAULT_LOGGING_FORMAT))
default_format = dict.fromkeys(
["otelTraceID", "otelSpanID", "otelServiceName", "otelTraceSampled"], "Default"
)
handler.setFormatter(
logging.Formatter(DEFAULT_LOGGING_FORMAT, defaults=default_format)
)
# Add the handler to diracx and all uvicorn logger
# Note adding it to just 'uvicorn' or the root logger
# is not enough because uvicorn sets propagate=False
Expand Down
2 changes: 0 additions & 2 deletions extensions/gubbins/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ ipython = ">=9.2.0"
# Ensure these packages are installed using conda instead of pip
python-gfal2 = "*"
m2crypto = "*"
# Limit setuptools version due to compatibility issues
setuptools = "<82.0"

# Gubbins features for providing dependencies
[feature.gubbins.pypi-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ipython = ">=9.2.0"
# Ensure these packages are installed using conda instead of pip
python-gfal2 = "*"
m2crypto = "*"
# Limit setuptools version due to compatibility issues
setuptools = "<82.0"
# opentelemetry-api requires importlib-metadata<8.8.0
importlib-metadata = "<8.8.0"

# DiracX features for providing dependencies
[feature.diracx.pypi-dependencies]
Expand Down
Loading