Skip to content

if I use register in a Microsoft Agent Framework app, no traces are sent to AX #28

Description

@jimbobbennett

I have an agent framework app that I want to trace with AX. If I use register, then tracing doesn't work, nothing gets sent to AX.

So:

tracer_provider = TracerProvider(
    resource=Resource.create(
        {PROJECT_NAME: os.getenv("ARIZE_PROJECT_NAME", "agent-framework")}
    )
)
# Process spans before exporting them to Arize.
tracer_provider.add_span_processor(AgentFrameworkToOpenInferenceProcessor())
tracer_provider.add_span_processor(
    BatchSpanProcessor(
        space_id=os.environ["ARIZE_SPACE_ID"],
        api_key=os.environ["ARIZE_API_KEY"],
    )
)
trace.set_tracer_provider(tracer_provider)

enable_instrumentation(enable_sensitive_data=True)

works and sends traces to AX, but:

tracer_provider = register(
    space_id=os.getenv("ARIZE_SPACE_ID"),
    api_key=os.getenv("ARIZE_API_KEY"),
    project_name="agent-framework",
)

if isinstance(tracer_provider, TracerProvider):
   tracer_provider.add_span_processor(AgentFrameworkToOpenInferenceProcessor())

trace.set_tracer_provider(tracer_provider)

# Enable agent-framework's built-in OTel instrumentation so it emits spans
enable_instrumentation(enable_sensitive_data=True)

doesn't send traces.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions