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

DB semconv: db-specific connection metrics or generic ones? #703

Open
lmolkova opened this issue Feb 7, 2024 · 5 comments
Open

DB semconv: db-specific connection metrics or generic ones? #703

lmolkova opened this issue Feb 7, 2024 · 5 comments
Assignees

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Feb 7, 2024

We currently have some connection-level metrics defined for databases: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-metrics.md

At the same time, connection/pool metrics would be the same for different technologies. See #454 for more details.

Proposal:

  • short-term: exclude db connection-level metrics from DB stabilization scope and keep them experimental
  • longer-term: introduce generic metrics and remove db-specific ones
@trask
Copy link
Member

trask commented Feb 9, 2024

@open-telemetry/java-instrumentation-approvers we have a lot of database connection instrumentations in Java, any thoughts?

@trask
Copy link
Member

trask commented Feb 9, 2024

it could still be useful to have different metric names, it feels a bit similar to how we have different metrics for http/rpc/db request durations

do you think there's a use case for aggregating across both database connection pools and other kinds of pools?

@lmolkova
Copy link
Contributor Author

lmolkova commented Feb 22, 2024

Note: this issue is not about pools, but about connections.

Let's assume we evolve semconv to the state that we have :

  • socket connection metrics
  • http connection metrics
  • amqp connection metrics
  • db connection metrics
  • rpc connection metrics
  • ...

All of them would have somewhat different set of attributes. Would it be a good user experience?

Essentially they are all socket connections. If socket-level is instrumented, we'll have duplication.

Now back to the connection pools: would it be a good experience if each of pool metrics would have custom *.connection.state attribute with idle|active|used values?

While DB or HTTP connection pool may have extra metrics specific to that pool, they can still share metrics for the underlying connections.

@pyohannes
Copy link
Contributor

do you think there's a use case for aggregating across both database connection pools and other kinds of pools?

I assume this is less a question of aggregating (which one can also do across different metrics), but more about consistency?

Given that there isn't much experience with connection level metrics (across semantic convention areas), I'd recommend to exclude those from initial stability. I don't think those metrics would be a "must" for initial stable DB semantic conventions.

I think that quite some amount of research and prototyping will be required to come to a well-founded decision.

@trask
Copy link
Member

trask commented Apr 24, 2024

short-term: exclude db connection-level metrics from DB stabilization scope and keep them experimental

👍

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

No branches or pull requests

4 participants