Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anthropic): instrument anthropics system message as gen_ai.prompt.0 #2238

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

dinmukhamedm
Copy link
Contributor

Address #2187 by dumping system message as gen_ai.prompt.0.content and gen_ai.prompt.0.role = "system". This will also increment all subsequent message indices by 1, e.g. first user message will become gen_ai.prompt.1.

  • I have added tests that cover my changes. <-- modified the existing ones with system message to check for it
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 2, 2024
@dinmukhamedm dinmukhamedm changed the title fix(anthropic) instrument anthropics system message as gen_ai.prompt.0 fix(anthropic): instrument anthropics system message as gen_ai.prompt.0 Nov 2, 2024
@dinmukhamedm dinmukhamedm mentioned this pull request Nov 2, 2024
2 tasks
@dosubot dosubot bot added python Pull requests that update Python code testing labels Nov 3, 2024
Copy link
Member

@nirga nirga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @dinmukhamedm!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2024
@nirga nirga merged commit f06cd01 into traceloop:main Nov 4, 2024
9 checks passed
@nirga nirga deleted the anthropic-system branch November 4, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer python Pull requests that update Python code size:M This PR changes 30-99 lines, ignoring generated files. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants