Skip to content

Commit

Permalink
Fix SQL Server metrics from gauge to monotonic sum
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKurek committed Apr 26, 2022
1 parent 9c3b2c8 commit 2990927
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- `resourcedetectionprocessor`: Wire docker detector (#9372)
- `kafkametricsreceiver`: The kafkametricsreceiver was changed to connect to kafka during scrape, rather than startup. If kafka is unavailable the receiver will attempt to connect during subsequent scrapes until succcessful (#8817).
- `datadogexporter`: Update Kubernetes example manifest to new executable name. (#9425).
- `sqlserverreceiver`: Update `sqlserver.transaction_log.growth.count` and `sqlserver.transaction_log.shrink.count` to be monotonic sums. (#9522)

## v0.49.0

Expand Down
4 changes: 2 additions & 2 deletions receiver/sqlserverreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ These are the metrics available for this scraper.
| **sqlserver.transaction_log.flush.data.rate** | Total number of log bytes flushed. | By/s | Gauge(Double) | <ul> </ul> |
| **sqlserver.transaction_log.flush.rate** | Number of log flushes. | {flushes}/s | Gauge(Double) | <ul> </ul> |
| **sqlserver.transaction_log.flush.wait.rate** | Number of commits waiting for a transaction log flush. | {commits}/s | Gauge(Double) | <ul> </ul> |
| **sqlserver.transaction_log.growth.count** | Total number of transaction log expansions for a database. | {growths} | Gauge(Double) | <ul> </ul> |
| **sqlserver.transaction_log.shrink.count** | Total number of transaction log shrinks for a database. | {shrinks} | Gauge(Double) | <ul> </ul> |
| **sqlserver.transaction_log.growth.count** | Total number of transaction log expansions for a database. | {growths} | Sum(Double) | <ul> </ul> |
| **sqlserver.transaction_log.shrink.count** | Total number of transaction log shrinks for a database. | {shrinks} | Sum(Double) | <ul> </ul> |
| **sqlserver.transaction_log.usage** | Percent of transaction log space used. | % | Gauge(Double) | <ul> </ul> |
| **sqlserver.user.connection.count** | Number of users connected to the SQL Server. | {connections} | Gauge(Double) | <ul> </ul> |

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions receiver/sqlserverreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,17 @@ metrics:
enabled: true
description: Total number of transaction log expansions for a database.
unit: "{growths}"
gauge:
sum:
monotonic: true
aggregation: cumulative
value_type: double
sqlserver.transaction_log.shrink.count:
enabled: true
description: Total number of transaction log shrinks for a database.
unit: "{shrinks}"
gauge:
sum:
monotonic: true
aggregation: cumulative
value_type: double
sqlserver.transaction_log.usage:
enabled: true
Expand Down

0 comments on commit 2990927

Please sign in to comment.