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

Add db connection attributes to database span's span data #2270

Closed
Tracked by #19
AbhiPrasad opened this issue Jul 25, 2023 · 0 comments · Fixed by #2274
Closed
Tracked by #19

Add db connection attributes to database span's span data #2270

AbhiPrasad opened this issue Jul 25, 2023 · 0 comments · Fixed by #2274
Assignees

Comments

@AbhiPrasad
Copy link
Member

AbhiPrasad commented Jul 25, 2023

ref getsentry/team-sdks#19

To get an overview of this work across all SDKs, please visit:
https://github.com/orgs/getsentry/projects/135

For the starfish db module it was determined that we need extra database attributes, specifically about the database connection attributes.

We're going to matching the otel db conventions. Either one of server.address or server.socket.address is required. If server.address is set, then server.port should be set. If server.port is different than server.socket.port, than server.socket.port should also be set. In addition, db.name should be set if possible.

Attribute Type Description Examples Requirement Level
server.address string Name of the database host. example.com Conditionally Required: See alternative attributes below.
server.port int Logical server port number 80; 8080; 443 Conditionally Required: [1]
server.socket.address string Physical server IP address or Unix socket address. 10.5.3.2 See below
server.socket.port int Physical server port. 16456 Recommended: If different than server.port.
db.name string This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). customers; main Conditionally Required: If applicable.

These values should be set on span.data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants