skunk icon indicating copy to clipboard operation
skunk copied to clipboard

Metric to track Postgres errors

Open matthughes opened this issue 1 year ago • 2 comments

I'd love a counter metric that tracked every Postgres error Skunk raises. I could take a stab at a PR if there is interest and you think this fits the project's goals.

matthughes avatar Sep 06 '24 17:09 matthughes

https://opentelemetry.io/docs/specs/semconv/database/database-metrics/ - there are official database semantic conventions, but they are still in the 'experimental' / 'development' state. But they should be marked stable, presumably this year.

We can follow the convention even for the draft implementation.

iRevive avatar Sep 07 '24 11:09 iRevive

There is an experimental generation of instruments from semantic conventions: https://github.com/typelevel/otel4s/pull/764.

If we merge it, we can use it to test the implementation.

iRevive avatar Sep 09 '24 16:09 iRevive

FYI: I wanted to take a stab at this one, using semconv for traces and adding metrics, I'll try to open a PR soon.

satabin avatar Dec 18 '25 17:12 satabin