Skip to content

feat: introduce db stats collector - #648

Merged
lvrach merged 15 commits into
mainfrom
feat.dbstats
Sep 26, 2024
Merged

lvrach merged 15 commits into
mainfrom
feat.dbstats

Conversation

@lvrach

@lvrach lvrach commented Sep 23, 2024 •

Copy link
Copy Markdown
Member

Description

Motivation

database/sql package exposes stats that are important for observing the state of the system, help us to address issue and guide to further optimisations.

Changes

This PR is:

  • Enabling to register multiple collectors
  • Introduce a collector for database/sql.DB
  • A simpler static collector, meant for metrics that don't change during the lifetime of the system

Collectors are ment to be used to periodically sampled values.
The stats implementation is responsible for running them and may optimise the collection to better match its own push/pull behaviour.

Linear Ticket

https://linear.app/rudderstack/issue/PRI-48/database-sql-stats

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@lvrach
lvrach marked this pull request as ready for review September 24, 2024 13:09
@lvrach
lvrach requested a review from Sidddddarth September 24, 2024 13:09
Comment thread stats/stats.go Resolved
Comment thread stats/collectors/sqldb.go Resolved
Comment thread stats/collectors.go Resolved
Comment thread stats/otel_collector_test.go Resolved
@lvrach
lvrach merged commit 8ac166b into main Sep 26, 2024
@lvrach
lvrach deleted the feat.dbstats branch September 26, 2024 19:08
achettyiitr added a commit to rudderlabs/rudder-server that referenced this pull request Oct 21, 2025
# Description

- Remove monitor database as we already are using
[RegisterCollector](rudderlabs/rudder-go-kit#648)
for db stats.

## Linear Ticket

- Resolves WAR-1183

## Security

- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants