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

chore: Added otel compliant attributes for database spans #2173

Merged
merged 3 commits into from
May 1, 2024

Conversation

mrickard
Copy link
Member

Description

Added OTEL-compliant db.system, server.address, and server.port properties to db spans.

How to Test

This PR includes additions to test/unit/spans/span-event.test.js and test/unit/spans/streaming-span-event.test.js, so running unit tests will include these.

Related Issues

Closes #2149
Closes NR-260092

@mrickard mrickard force-pushed the NR-260092/add-otel-db-props branch from e67b5f5 to b4b7a08 Compare April 30, 2024 13:58
@@ -64,7 +64,7 @@ class StreamingSpanEvent {
*
* @param {string} key Name of the attribute to be stored.
* @param {string|boolean|number} value Value of the attribute to be stored.
* @param {boolean} [truncateExempt=false] Set to true if attribute should not be truncated.
* @param {boolean} [truncateExempt] Set to true if attribute should not be truncated.
Copy link
Member

Choose a reason for hiding this comment

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

this appears to default to false, why was the jsdoc updated?

Copy link
Member Author

Choose a reason for hiding this comment

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

What's weird is that I didn't update that. That may be fallout from running lint or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or it's our pre-commit hooks.

lib/spans/streaming-span-event.js Outdated Show resolved Hide resolved
lib/spans/span-event.js Outdated Show resolved Hide resolved
bizob2828
bizob2828 previously approved these changes Apr 30, 2024
lib/spans/span-event.js Outdated Show resolved Hide resolved
@mrickard mrickard merged commit 3fdcab4 into newrelic:main May 1, 2024
22 checks passed
bizob2828 pushed a commit that referenced this pull request May 20, 2024
@mrickard mrickard deleted the NR-260092/add-otel-db-props branch August 8, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add otel compliant attributes for database spans
2 participants