-
Notifications
You must be signed in to change notification settings - Fork 441
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
contrib/database/sql: Submit DBStats as Datadog metrics #2543
Conversation
…ib, and expose tracer statsd client
BenchmarksBenchmark execution time: 2024-02-27 18:57:47 Comparing candidate commit 9523300 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 39 metrics, 1 unstable metrics. scenario:BenchmarkPartialFlushing/Disabled-24
|
…nd tracer to share stats from former to latter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks like a sound approach! I'll read over the design doc when you send it, and that'll probably help clarify things too. Nice work! 🥳
Co-authored-by: Katie Hockman <[email protected]>
…en passed to Register
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small comments, but otherwise looks good! We should be good to merge after this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are just test-related comments, I'll go ahead and approve and we can merge after those are addressed 😄
…to mtoff/sql_metrics
MaxIdleClosed = tracerPrefix + "sql.db.connections.closed.max_idle_conns" | ||
MaxIdleTimeClosed = tracerPrefix + "sql.db.connections.closed.max_idle_time" | ||
MaxLifetimeClosed = tracerPrefix + "sql.db.connections.closed.max_lifetime" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Should these be public? (if not, we could still make them private before the next release starts on Monday, cc @dianashevchenko )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there's no need for these to be public, that was just an oversight!
What does this PR do?
Publicly, this PR exposes a contrib/database/sql option to enable polling and submission of DBStats as metrics to Datadog
Ref: https://pkg.go.dev/database/sql#DBStats
This PR also lays the groundwork on the
tracer
package for submitting statsd payloads from other contrib integrations in the future, if desiredMotivation
Customer requests
#2303
Reviewer's Checklist
For Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!