mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
chore: read otel endpoint from settings (#1312)
This commit is contained in:
parent
05762613a6
commit
8ea895c5aa
@ -64,8 +64,7 @@ ENV LETTA_ENVIRONMENT=${LETTA_ENVIRONMENT} \
|
||||
POSTGRES_USER=letta \
|
||||
POSTGRES_PASSWORD=letta \
|
||||
POSTGRES_DB=letta \
|
||||
COMPOSIO_DISABLE_VERSION_CHECK=true \
|
||||
LETTA_OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
||||
COMPOSIO_DISABLE_VERSION_CHECK=true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
@ -256,7 +256,7 @@ def create_application() -> "FastAPI":
|
||||
)
|
||||
|
||||
# Set up OpenTelemetry tracing
|
||||
otlp_endpoint = os.getenv("LETTA_OTEL_EXPORTER_OTLP_ENDPOINT")
|
||||
otlp_endpoint = settings.otel_exporter_otlp_endpoint
|
||||
if otlp_endpoint:
|
||||
print(f"▶ Using OTLP tracing with endpoint: {otlp_endpoint}")
|
||||
env_name_suffix = os.getenv("ENV_NAME")
|
||||
|
@ -90,8 +90,8 @@ async def trace_error_handler(_request: Request, exc: Exception) -> JSONResponse
|
||||
# Add error details to current span
|
||||
span = trace.get_current_span()
|
||||
if span:
|
||||
span.add_event(
|
||||
name="exception",
|
||||
span.record_exception(
|
||||
exc,
|
||||
attributes={
|
||||
"exception.message": error_msg,
|
||||
"exception.type": type(exc).__name__,
|
||||
|
@ -62,6 +62,9 @@ exporters:
|
||||
max_elapsed_time: 300s
|
||||
|
||||
service:
|
||||
telemetry:
|
||||
logs:
|
||||
level: error
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
|
@ -20,6 +20,9 @@ exporters:
|
||||
max_backups: 5
|
||||
|
||||
service:
|
||||
telemetry:
|
||||
logs:
|
||||
level: error
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
|
Loading…
Reference in New Issue
Block a user