[receiver/sqlserver] Add Always On Availability Group database replica metrics#49476
[receiver/sqlserver] Add Always On Availability Group database replica metrics#49476splunk-shanu wants to merge 11 commits into
Conversation
|
@splunk-shanu do these metrics require additional permissions to what's documented right now? |
thompson-tomo
left a comment
There was a problem hiding this comment.
See previous attempt in #48377
| gauge: | ||
| value_type: double | ||
| attributes: [] | ||
| sqlserver.availability_group.estimated_data_loss: |
There was a problem hiding this comment.
Naming doesn't follow semconv naming guidance and is ambiguous.
There was a problem hiding this comment.
follows {system}.{area}.{property} pattern correctly
There was a problem hiding this comment.
It doesn't satisfy
Be precise. Attribute, event, metric, and other names should be descriptive and unambiguous.
For instance why is estimated in the name? What data is being lost?
At the same time, name gives the impression that it is the data has been lost but the measurement is in seconds. Data is not measured in seconds but rather bytes.
There was a problem hiding this comment.
updated to more descriptive description, but name will have estimate as it is defined in dmv please refer dmv for more detail.
There was a problem hiding this comment.
My quote is taken directly from the naming document https://opentelemetry.io/docs/specs/semconv/general/naming/
The name of the metric doesn't need to match db column name.
| value_type: double | ||
| attributes: [availability_group.name, db.namespace, replica.name] | ||
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.estimated_recovery_time: |
There was a problem hiding this comment.
Naming doesn't follow semconv naming guidance.
There was a problem hiding this comment.
follows {system}.{area}.{property} pattern correctly
There was a problem hiding this comment.
It doesn't satisfy
Be precise. Attribute, event, metric, and other names should be descriptive and unambiguous.
For instance why is estimated in the name?
At the same time it is a property of the replica rather than the group.
There was a problem hiding this comment.
updated to more descriptive description, but name will have estimate as it is defined in dmv please refer dmv for more detail.
There was a problem hiding this comment.
My quote is taken directly from the naming document https://opentelemetry.io/docs/specs/semconv/general/naming/
The name of the metric doesn't need to match db column name.
| value_type: double | ||
| attributes: [availability_group.name, db.namespace, replica.name] | ||
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.hardened_latency: |
There was a problem hiding this comment.
Naming doesn't follow semconv naming guidance and is ambiguous.
There was a problem hiding this comment.
follows {system}.{area}.{property} pattern correctly
There was a problem hiding this comment.
Hardened latency is not a property of the group but rather a replica.
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.log_send.queue.size: | ||
| enabled: false | ||
| description: Amount of log records of the primary database that has not been sent to the secondary replicas. |
There was a problem hiding this comment.
Description contradicts unit.
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.log_send.rate: | ||
| enabled: false | ||
| description: Rate at which log records are being sent from the primary database replica to the secondary replica. |
There was a problem hiding this comment.
Description contradicts unit.
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.redo.queue.size: | ||
| enabled: false | ||
| description: Amount of log records of the secondary database that has not yet been redone. |
There was a problem hiding this comment.
Description contradicts unit.
| extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server and the instance has Always On Availability Groups enabled. | ||
| sqlserver.availability_group.redo.rate: | ||
| enabled: false | ||
| description: Rate at which log records are being redone on the secondary database replica. |
There was a problem hiding this comment.
Description contradicts unit.
Adds 6 new opt-in metrics for monitoring SQL Server Always On Availability Groups, sourced directly from sys.dm_hadr_database_replica_states:
All metrics are scoped per database per replica and include sqlserver.availability_group.name, db.namespace, and sqlserver.replica.name attributes. All metrics are disabled by default and require a direct connection to SQL Server with Always On Availability Groups enabled.
Link to tracking issue
(fill in if applicable)
Testing
Unit tests added covering metric recording from sys.dm_hadr_database_replica_states. Test data files added under testdata/.
Documentation
documentation.md regenerated via make generate to include the 6 new metrics with their attributes, units, and extended documentation notes.
Authorship