fix(#2076): make db.response.error attribute selection consistent with other optional attributes#2086
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2086 +/- ##
==========================================
+ Coverage 69.19% 69.52% +0.32%
==========================================
Files 289 289
Lines 36234 36286 +52
==========================================
+ Hits 25073 25228 +155
+ Misses 9805 9685 -120
- Partials 1356 1373 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CI Supervisor
|
…eparate file Update the Selection type comment and JSON schema description to mention the traces key for trace attribute selection. Regenerate CONFIG.md to match the auto-generated output (removing free-form sections that break the check-config-schema CI check). Move the detailed db.response.error documentation into devdocs/db-response-error.md.
Rename devdocs/db-response-error.md to devdocs/attribute-selection.md and update the title to be more general as suggested in review.
When db.response.error is not selected, omit the status message entirely instead of adding a placeholder hint. This aligns with how other optional attributes (e.g. db.query.text) behave — they are simply not present when not selected, without any placeholder.
marctc
left a comment
There was a problem hiding this comment.
Unless I'm missing something, this should be documented in official OBI docs, like this open-telemetry/opentelemetry.io#9753
devdocs IMHO should be only used to documented stuff that's helpful for the developers of this project.
|
Thanks @marctc — you're right. Looking at the I'll remove the devdocs file from this PR and open a follow-up PR against opentelemetry.io to document the Let me know if you'd also like the config-schema description change reverted, or if that can stay since it's developer-facing reference. |
sounds good, thanks! |
Per reviewer feedback, user-facing documentation should be in official OBI docs (opentelemetry.io) rather than devdocs/. devdocs/ is intended for project developer documentation only. Will follow up with documentation PR to opentelemetry.io.
marctc
left a comment
There was a problem hiding this comment.
I'm happy to unblock the PR but the description and title doesn't match the PR anymore. Would you mind update it?
|
@marctc Done! I've updated the PR title and description to reflect the current scope (code behavior change only, documentation moved to opentelemetry.io in a separate PR). Thanks for flagging this! |
Description
When
db.response.erroris not included inattributes.select.traces, the span status message is now left empty instead of showing a placeholder hint. This makes the behavior consistent with how other optional attributes (e.g.db.query.text) work — when not selected, they are simply omitted.Changes
DBErrorMessagePlaceholderconstantDBResponseErrorAttr()to return nil when the attribute is not selectedattributes.selectapplies to both metrics and tracesFixes #2076