feat: expose OTel semantic convention version in trace metadata#166
Conversation
krisztianfekete
left a comment
There was a problem hiding this comment.
Thanks for the PR, it's going in the correct direction as per our discussion on the issue. Added some comments!
| if match: | ||
| return match.group(1) | ||
|
|
||
| return "unknown" |
There was a problem hiding this comment.
Since TraceConversionMetadata.semconv_version is typed, this can never be null, but "unknown". Let's return None and serialise to null.
There was a problem hiding this comment.
Done. resolve_schema_version now degrades to None instead of "unknown" for missing or invalid schema URLs
There was a problem hiding this comment.
Let's default this to None as well: https://github.com/agentevals-dev/agentevals/pull/166/changes#diff-4a6470bc01aaa3380e1f72442dc95da86675d5336db007716ea6927629b82328R188
There was a problem hiding this comment.
Updated. GENAI_ATTRIBUTE_ALIASES now deafults to None
…ange resolve_semconv_version() to return `None`
added description field to `TraceConversionMetadata` and updated `resolve_schema_version` docstring
krisztianfekete
left a comment
There was a problem hiding this comment.
Added one more comment, otherwise we are good to go!
| ADK_INVOCATION_ID = "gcp.vertex.agent.invocation_id" | ||
|
|
||
| # GenAI attribute alias table | ||
| GENAI_ATTRIBUTE_ALIASES: Optional[dict[str, list[str]]] = None |
There was a problem hiding this comment.
This is a regression. resolve_attr requires a dict, None raises AttributeError. A "no aliases" state is {} or a missing key, never None. Restore the dict please.
There was a problem hiding this comment.
My bad, I misunderstood the comment there. I've restored the dict and applied the changes to schema_version in trace_metrics
| "model": None, | ||
| "response_model": None, | ||
| "provider": None, | ||
| "schema_version": "unknown", |
There was a problem hiding this comment.
This is all we need I guess.
| "schema_version": "unknown", | |
| "schema_version": None, |
Description
schema_urlto exposesemconv_versionin conversion metadata.extract_*_from_attrs) without rewriting attributes during ingestion.gen_ai.provider.name→gen_ai.system).semconv_versionextraction, metadata propagation, and API serialization.Related Issues
Closes #162
Notes
otel.schema_urlis treated as generic OTel metadata and not as a GenAI detection signal.