-
Notifications
You must be signed in to change notification settings - Fork 921
Description
Background
According to semantic-conventions v1.38.0, generative AI instrumentations should emit chat messages as complex attributes both in span and in log, which depends on the option. However, when we try to migrate the semconv of OpenAI from v1.36.0 to v1.38.0 (see this PR), it turns out that we just support the capture of complex attributes in log now, and the feature for span is still on the way.
I believe this is a great user case which promotes the popularity of complex attributes and it's a great timing to do that. @trask and I have discussed this topic on the APAC Java SIG and then we have this issue.
Issues depend on this feature:
- Migrate the semantic conventions of OpenAI instrumentation to 1.37.0. opentelemetry-java-instrumentation#15174
- What are the Best Practices for Providing Instrumentation for Spring AI. opentelemetry-java-instrumentation#12878
Suggested Solution
We should add some test cases for extended span like this. Relevant infrastructures like marshalers should also be ready.
P.S. I guess we're able to set an object in Value<?> type as a span attribute yet but perhaps I'm wrong. I will add more information after studying it.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.