forked from phoenix/litellm-mirror
test- otel span recording
This commit is contained in:
parent
cb6ddaf1f9
commit
02ab3cb73d
5 changed files with 242 additions and 0 deletions
|
@ -52,6 +52,12 @@ class OpenTelemetryConfig:
|
|||
|
||||
OTEL_HEADERS gets sent as headers = {"x-honeycomb-team": "B85YgLm96******"}
|
||||
"""
|
||||
from opentelemetry.sdk.trace.export.in_memory_span_exporter import (
|
||||
InMemorySpanExporter,
|
||||
)
|
||||
|
||||
if os.getenv("OTEL_EXPORTER") == "in_memory":
|
||||
return cls(exporter=InMemorySpanExporter())
|
||||
return cls(
|
||||
exporter=os.getenv("OTEL_EXPORTER", "console"),
|
||||
endpoint=os.getenv("OTEL_ENDPOINT"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue