Coolness.
Gotcha. SO... in that case maybe it would be useful to know how to annotate the telemetry with that information from the run time?
(would not be the first time in my life I'm working hard to solve a problem but not the problem) 😄
But let me ask a broader question: Given that this was so difficult... is the thing I'm trying to do unusual? How do others memorialize metrics (such as from ragas) when working in concert with Phoenix?
This is great. And yes... you'd really want the annotation to go on the "top" span.
Appreciate it Mikyo
resource = Resource(attributes={ "service.name": "kurts-llamaindex-service" }) tracer_provider = trace_sdk.TracerProvider(resource=resource) span_exporter = OTLPSpanExporter( endpoint=f"{phoenix_endpoint_collector}/v1/traces" ) span_processor = SimpleSpanProcessor(span_exporter=span_exporter) tracer_provider.add_span_processor(span_processor=span_processor) trace_api.set_tracer_provider(tracer_provider=tracer_provider) LlamaIndexInstrumentor().instrument() query_engine = index.as_query_engine( similarity_top_k=2) response = query_engine.query(question) span_id = # What here??????
How do I make use of that?
I just can't figure out how to grab the span_id of whatever span gets created when a query is made.
Thanks. It's getting close to working... but stand by 🙂