You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, dd-trace-go's contrib/database/sql package supports an option to send DBStats as Datadog metrics (refer to [#2303](DataDog/dd-trace-go#2303) and [PR #2543](DataDog/dd-trace-go#2543)). However, when using orchestrion, automatic instrumentation is applied, and currently, there is no way to explicitly enable the collection of DBStats metrics.
To enhance observability, we propose adding support for sending DBStats metrics within orchestrion. This would allow users to track database connection pool statistics more effectively when using automatic instrumentation.
Proposed Solution
Introduce an option in orchestrion to enable DBStats collection.
Ensure that enabling this feature integrates seamlessly with existing automatic instrumentation.
Provide configuration options similar to those in contrib/database/sql.
Use Case
Developers using orchestrion for automatic database instrumentation currently lack access to DBStats metrics, which are valuable for monitoring database connection performance. Supporting this feature would align orchestrion's capabilities with contrib/database/sql and improve visibility into database behavior.
moko-poi
changed the title
Support for Sending DBStats Metrics in Orchestrion Instrumentation
[Enhancement] Support for Sending DBStats Metrics in Orchestrion Instrumentation
Mar 7, 2025
This change provides a simple mechanism to enable the WithDBStats() option when the environment variable ENABLE_DB_STATS=true is set. This approach offers a straightforward implementation that can be extended in the future with configuration file support if needed.
If more detailed configuration (such as adjusting the metrics collection interval) is required, we could consider additional options. I believe starting with this simple implementation would be a good first step, but I'm open to feedback if you have other suggestions.
Description
Currently,
dd-trace-go
'scontrib/database/sql
package supports an option to sendDBStats
as Datadog metrics (refer to [#2303](DataDog/dd-trace-go#2303) and [PR #2543](DataDog/dd-trace-go#2543)). However, when usingorchestrion
, automatic instrumentation is applied, and currently, there is no way to explicitly enable the collection ofDBStats
metrics.To enhance observability, we propose adding support for sending
DBStats
metrics withinorchestrion
. This would allow users to track database connection pool statistics more effectively when using automatic instrumentation.Proposed Solution
orchestrion
to enableDBStats
collection.contrib/database/sql
.Use Case
Developers using
orchestrion
for automatic database instrumentation currently lack access toDBStats
metrics, which are valuable for monitoring database connection performance. Supporting this feature would alignorchestrion
's capabilities withcontrib/database/sql
and improve visibility into database behavior.References
Would love to hear thoughts from the maintainers on whether this could be implemented. Let me know if additional details are needed! 🚀
The text was updated successfully, but these errors were encountered: