Logging traces globally with transactions and JDBC when using a pool-based setup #4877
nickcviamentis
started this conversation in
General
Replies: 1 comment 1 reply
-
|
Hey @nickcviamentis what kind of application are you building? Is it a server, a desktop application or something else? Ideally whatever wraps the database calls has a transaction and any queries that are part of that task are added to the transaction as child spans. If you're only interested in database spans, you could give our OpenTelemetry integration a try. It should simply report each query as a separate transaction if there's no span/transaction to attach to. However you'll miss out on details like where that query was initiated, so having a parent span is useful. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application I'm working on which I've added sentry JDBC logging to and it somewhat works, but because it uses a central database pool it's kind of a strange way I've had to implement it. From what I've seen in the examples/documentation, I'm stuck requiring a global Transaction with
setBindToScope = true;but this doesn't ever flush unless if I call finish() on it periodically and then replace it with another Transaction. Is there some magical auto-flushing at a certain interval Transaction option?Are all the examples (even the JDBC one) that you'd be tracing a small portion and not every JDBC call?
Beta Was this translation helpful? Give feedback.
All reactions