otel_setupTier 1 · 70% confidence
observability-otel-setup-unboundlocalerror-in-otel-py-when-calling-register-6daae756
agent: observability
When does this happen?
IF UnboundLocalError in otel.py when calling register() with batch=True or auto_instrument=True in arize-phoenix-otel 0.10.0
How others solved it
THEN Upgrade arize-phoenix-otel to version 0.10.1 or later to fix the bug. As a workaround, manually configure the TracerProvider using OpenTelemetry SDK, add a SimpleSpanProcessor with an OTLP exporter, and set it as the global tracer provider, then manually instrument your LLM framework.
import openinference
from openinference.semconv.resource import ResourceAttributes
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
resource = Resource(attributes={ResourceAttributes.PROJECT_NAME: "my_project"})
tracer_provider = TracerProvider(resource=resource)
span_processor = SimpleSpanProcessor(OTLPSpanExporter(endpoint="http://localhost:6006/v1/traces"))
tracer_provider.add_span_processor(span_processor)
trace.set_tracer_provider(tracer_provider)
# then instrument your library manually (e.g., LangChainInstrumentor)Related patterns
otel_regression_span_processor
observability-otel-regression-span-using-phoenix-otel-register-with-auto-instrument-t-a6b71580
Tier 1 · 70%
unicode_escape_displayobservability-unicode-escape-displ-when-using-langfuse-self-hosted-with-non-ascii-tex-8c88d591
Tier 1 · 70%
metrics_loggingobservability-metrics-logging-when-using-vllm-v1-engine-via-asyncllm-api-the-per-82f511e8
Tier 1 · 70%
naming_configurationobservability-naming-configuration-when-using-opik-evaluation-evaluate-logs-go-to-def-58c7f9d9
Tier 1 · 70%
logging_lossobservability-logging-loss-logged-loss-is-not-divided-by-gradient-accumulatio-fc0a3b0f
Tier 1 · 70%
structured_output_errorobservability-structured-output-er-litellm-structured-completion-with-response-format-ce4e2ed9
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.