Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,8 +23,12 @@ from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
|
| 23 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
| 24 |
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
trace_provider = TracerProvider()
|
| 27 |
-
trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter()))
|
| 28 |
|
| 29 |
SmolagentsInstrumentor().instrument(tracer_provider=trace_provider)
|
| 30 |
|
|
|
|
| 23 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
| 24 |
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
|
| 25 |
|
| 26 |
+
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel" # EU data region
|
| 27 |
+
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
|
| 28 |
+
|
| 29 |
+
|
| 30 |
trace_provider = TracerProvider()
|
| 31 |
+
trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint="https://cloud.langfuse.com/api/public/otel")))
|
| 32 |
|
| 33 |
SmolagentsInstrumentor().instrument(tracer_provider=trace_provider)
|
| 34 |
|