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

Why is PostgreSQL peer.address a JDBC string? #473

Closed
pauldraper opened this issue May 5, 2021 · 7 comments
Closed

Why is PostgreSQL peer.address a JDBC string? #473

pauldraper opened this issue May 5, 2021 · 7 comments

Comments

@pauldraper
Copy link
Contributor

jdbc:postgresql://host:5432/database

Why? Do tools normally use JDBC URLs as an address?

All tools I know of, including psql, use the postgresql (or postgres) scheme.

psql postgresql://host:5432/database
@vmarchaud
Copy link
Member

@pauldraper
Copy link
Contributor Author

In my reading, I don't see anything about peer.address (or net.peer.address).

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Nov 22, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2021

This issue was closed because it has been stale for 14 days with no activity.

@github-actions github-actions bot closed this as completed Dec 6, 2021
@pauldraper
Copy link
Contributor Author

pauldraper commented Dec 8, 2021

I still have this question.

I don't see anything about peer.address in the standard.

@dyladan dyladan reopened this Dec 8, 2021
@dyladan dyladan removed the stale label Dec 8, 2021
@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

@dyladan
Copy link
Member

dyladan commented Dec 8, 2021

Created #781 to address this

@dyladan dyladan closed this as completed Dec 8, 2021
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

3 participants