-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
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