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

[postgres, mysql, mysql2] Update database connection semantic conventions #781

Open
dyladan opened this issue Dec 8, 2021 · 0 comments
Open

Comments

@dyladan
Copy link
Member

dyladan commented Dec 8, 2021

It appears it is just drastically outdated. The spec at the time of writing the postgres instrumentation was this: https://github.com/open-telemetry/opentelemetry-specification/blob/c8109895a989480028b282fa796ed87ad1421b8a/specification/data-database.md which specified the JDBC substring.

The recent spec is quite different and requires:

  • db.system - postgresql
  • One of net.peer.name OR net.peer.ip - hostname or ip respectively
  • net.peer.port only if using nonstandard port
  • net.transport recommended in general, required only if using in-process - tcp or inproc

db.connection_string is not required but seems to be the replacement for the jdbc string.

This most likely also affects the mysql and mysql2 instrumentations

Originally posted by @dyladan in #473 (comment)

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

No branches or pull requests

2 participants