Skip to content

fix: support legacy gen_ai.prompt/completion attributes for Ollama traces#136

Open
mesutoezdil wants to merge 3 commits into
agentevals-dev:mainfrom
mesutoezdil:fix/legacy-genai-attributes
Open

fix: support legacy gen_ai.prompt/completion attributes for Ollama traces#136
mesutoezdil wants to merge 3 commits into
agentevals-dev:mainfrom
mesutoezdil:fix/legacy-genai-attributes

Conversation

@mesutoezdil
Copy link
Copy Markdown
Contributor

@mesutoezdil mesutoezdil commented May 5, 2026

Fixes #88

Ollama's instrumentor emits flat indexed attributes instead of JSON arrays:

gen_ai.prompt.0.role = user
gen_ai.prompt.0.content = Hi!

Added a fallback in extraction.py that reads these when the standard attributes are absent. Standard attributes still take priority. Five tests cover the new path.

@mesutoezdil mesutoezdil force-pushed the fix/legacy-genai-attributes branch from 0b82f18 to 050c2d3 Compare May 12, 2026 18:01
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.

Support legacy GenAI attributes (gen_ai.prompt.*, gen_ai.completion.*)

1 participant