burr icon indicating copy to clipboard operation
burr copied to clipboard

bug: `burr.integrations.opentelemetry.init_instruments()` doesn't work consistently.

Open zilto opened this issue 1 year ago • 0 comments

This requires some investigation as it currently fails silently. We can tell it fails because no telemetry appears in Burr UI. In case of success, the two should lead to equivalent Burr UI telemetry displayed:

from opentelemetry.instrumentation.openai import OpenAIInstrumentor

OpenAIInstrumentor().instrument()

# build and run the app
app = ApplicationBuilder().with_tracker(..., use_otel_tracing=True).build()
app.run(...)
from burr.integrations.opentelemetry import init_instruments

init_instruments("openai")

# build and run the app
app = ApplicationBuilder().with_tracker(..., use_otel_tracing=True).build()
app.run(...)

Sidenote: the benefit of the Burr integration is that it allows to instrument multiple libraries with the same import by changing the strings passed as arg

zilto avatar Oct 28 '24 21:10 zilto