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

Define error metadata tags #2786

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions ext/tags.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ declare const tags: {
SAMPLING_PRIORITY: 'sampling.priority'
ANALYTICS: '_dd1.sr.eausr'
ERROR: 'error'
ERROR_MSG: 'error.message',
ERROR_TYPE: 'error.type',
ERROR_STACK: 'error.stack',
MANUAL_KEEP: 'manual.keep'
MANUAL_DROP: 'manual.drop'
MEASURED: '_dd.measured'
Expand Down
3 changes: 3 additions & 0 deletions ext/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const tags = {
SAMPLING_PRIORITY: 'sampling.priority',
ANALYTICS: '_dd1.sr.eausr',
ERROR: 'error',
ERROR_MSG: 'error.message',
Copy link
Author

Choose a reason for hiding this comment

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

📝 dd-trace-go changes error.msg to error.messages on 2022-12-07
DataDog/dd-trace-go#1605

Copy link
Member

Choose a reason for hiding this comment

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

What is your use case for setting these manually? It should be enough to set the ERROR tag to an error object which will then automatically be converted to the appropriate tags internally. Setting these manually is discouraged.

ERROR_TYPE: 'error.type',
ERROR_STACK: 'error.stack',
MANUAL_KEEP: 'manual.keep',
MANUAL_DROP: 'manual.drop',
MEASURED: '_dd.measured',
Expand Down