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_USER=letta \
|
||||||
POSTGRES_PASSWORD=letta \
|
POSTGRES_PASSWORD=letta \
|
||||||
POSTGRES_DB=letta \
|
POSTGRES_DB=letta \
|
||||||
COMPOSIO_DISABLE_VERSION_CHECK=true \
|
COMPOSIO_DISABLE_VERSION_CHECK=true
|
||||||
LETTA_OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ def create_application() -> "FastAPI":
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Set up OpenTelemetry tracing
|
# Set up OpenTelemetry tracing
|
||||||
otlp_endpoint = os.getenv("LETTA_OTEL_EXPORTER_OTLP_ENDPOINT")
|
otlp_endpoint = settings.otel_exporter_otlp_endpoint
|
||||||
if otlp_endpoint:
|
if otlp_endpoint:
|
||||||
print(f"▶ Using OTLP tracing with endpoint: {otlp_endpoint}")
|
print(f"▶ Using OTLP tracing with endpoint: {otlp_endpoint}")
|
||||||
env_name_suffix = os.getenv("ENV_NAME")
|
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
|
# Add error details to current span
|
||||||
span = trace.get_current_span()
|
span = trace.get_current_span()
|
||||||
if span:
|
if span:
|
||||||
span.add_event(
|
span.record_exception(
|
||||||
name="exception",
|
exc,
|
||||||
attributes={
|
attributes={
|
||||||
"exception.message": error_msg,
|
"exception.message": error_msg,
|
||||||
"exception.type": type(exc).__name__,
|
"exception.type": type(exc).__name__,
|
||||||
|
@ -62,6 +62,9 @@ exporters:
|
|||||||
max_elapsed_time: 300s
|
max_elapsed_time: 300s
|
||||||
|
|
||||||
service:
|
service:
|
||||||
|
telemetry:
|
||||||
|
logs:
|
||||||
|
level: error
|
||||||
pipelines:
|
pipelines:
|
||||||
traces:
|
traces:
|
||||||
receivers: [otlp]
|
receivers: [otlp]
|
||||||
|
@ -20,6 +20,9 @@ exporters:
|
|||||||
max_backups: 5
|
max_backups: 5
|
||||||
|
|
||||||
service:
|
service:
|
||||||
|
telemetry:
|
||||||
|
logs:
|
||||||
|
level: error
|
||||||
pipelines:
|
pipelines:
|
||||||
traces:
|
traces:
|
||||||
receivers: [otlp]
|
receivers: [otlp]
|
||||||
|
Loading…
Reference in New Issue
Block a user