Skip to content

feat(log-enrichment): add custom session ID attribute for enriched spans#181

Open
AaronProbha18 wants to merge 1 commit into
agentevals-dev:mainfrom
AaronProbha18:feat/174-stop-stash-session-id
Open

feat(log-enrichment): add custom session ID attribute for enriched spans#181
AaronProbha18 wants to merge 1 commit into
agentevals-dev:mainfrom
AaronProbha18:feat/174-stop-stash-session-id

Conversation

@AaronProbha18

Copy link
Copy Markdown
Contributor

Summary

This PR stops storing session IDs in the OpenTelemetry semantic convention attribute gen_ai.agent.name and instead records them in a repository-specific custom attribute, agentevals.session.id.

Previously, the log enrichment pipeline wrote the session ID into gen_ai.agent.name, overwriting legitimate agent names from SDK and OTLP telemetry. This caused downstream metadata extraction to incorrectly report the session ID as the agent name.

Changes

  • Added the new custom telemetry attribute agentevals.session.id.
  • Replaced all session ID writes in the log enrichment pipeline to use agentevals.session.id.
  • Factored the duplicated session ID injection logic into a shared helper used by both enrichment paths.
  • Preserved gen_ai.agent.name for genuine agent names supplied by telemetry.
  • Updated log enrichment tests to verify that session IDs are written to the new attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant