agents-course icon indicating copy to clipboard operation
agents-course copied to clipboard

[HANDS-ON BUG] Unit 2.2 Error 401 because the LlamaTrace's api has changed

Open jialiu-github opened this issue 5 months ago • 0 comments

Describe the bug the last code of "Unit 2.2 what are components in LlamIndex? " will get Error 401

To Reproduce Run the code

Screenshots "ERROR - Failed to export span batch code: 401, reason: "

Additional context Reason: The API has changed. The following code works now.

import os

# Import open-telemetry dependencies
from arize.otel import register

# Setup OTel via our convenience function
tracer_provider = register(
    space_id = "your-space-id", # in app space settings page
    api_key = "your-api-key", # in app space settings page
    project_name = "your-project-name", # name this to whatever you would like
)
# Import the automatic instrumentor from OpenInference
from openinference.instrumentation.llama_index import LlamaIndexInstrumentor

# Finish automatic instrumentation
LlamaIndexInstrumentor().instrument(tracer_provider=tracer_provider)

Also, the dependency should be changed:

pip install arize-otel openai openinference-instrumentation-openai opentelemetry-exporter-otlp

You can find more information about the API here: https://arize.com/docs/ax/quickstarts/quickstart-tracing#llamaindex

jialiu-github avatar Nov 19 '25 08:11 jialiu-github