-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add gen_ai.input.messages original length attribute #241
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
aca5375
feat: add gen_ai.input.messages original length attribute
obostjancic f3035c7
Update generated/attributes/sentry.md
obostjancic 9e8af4e
reformat
obostjancic b7b173a
Merge branch 'main' into ogi/feat/gen-ai-original-messages
obostjancic d7d5946
Update generated/attributes/sentry.md
obostjancic 5257ca8
fix comment
obostjancic d41ac50
pii maybe
obostjancic 667ca0a
Merge branch 'main' into ogi/feat/gen-ai-original-messages
obostjancic e897da1
fix
obostjancic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "key": "sentry.sdk_meta.gen_ai.input.messages.original_length", | ||
| "brief": "The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s).", | ||
| "type": "integer", | ||
| "pii": { | ||
| "key": "maybe" | ||
| }, | ||
| "is_in_otel": false, | ||
| "example": 5 | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Feel free to disregard, I basically just came across this and wanted to share a thought)
I don't wanna stir up too much bike shedding here but did we settle on this name yet?
As in: is
sentry.sdk_metathe "namespace" we want to use for (I guess) annotating other, non-sentry, attributes? I'd like us to just take a moment here and think this through because this name is very long and nested. I don't have enough context around AI monitoring to popose a well thought through alternative but at least a bit shorter and less nested:sentry.meta.gen_ai_input_messages.original_lengthMy primary concern here is the product showing nested keys in nested levels. So maybe we remove the
.from the original attribute name to also indicate that this attribute describes the very attribute in its name?(Nesting example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, yeah I share a lot of the same concerns but we agreed on this already and sdks actually already implement it. You are right, this is very nested but we wanted it to relate to the original attribute (in this case it is already non-short
gen_ai.input.messages) :/Product nesting looks ok though:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ideally we/SDKs secure a namesapce for such information and possibly their own format/spec, then we hide the entire namespace in the UI by default and render it nicely.