Skip to content

[receiver/sqlserver] Request to add support for more metrics #29865

Closed
@crobert-1

Description

@crobert-1

Component(s)

receiver/sqlserver

Describe the issue you're reporting

Background
I have a list of metrics that have been identified as helpful to users historically, but are not yet supported by the SQL Server receiver.

The SQL Server receiver is using an internal pkg winperfcounters, which in turn is using the underlying logic of an internal package. I don't quite follow the context of this package at this point, but it looks almost like a port of InfluxData's telegraf package?

Requested metrics to add
I've written the metrics with the naming format supported by the telegraf SQL server plugin, the following metrics are what I would want to add. More information about how metrics are retrieved and made available can be found here in the README.

# These come from IO metrics
sqlserver_database_io.read_bytes
sqlserver_database_io.read_latency_ms
sqlserver_database_io.reads
sqlserver_database_io.write_bytes
sqlserver_database_io.write_latency_ms
sqlserver_database_io.writes

# These align with resource pool performance metrics
sqlserver_performance.disk_read_io_throttled_sec
sqlserver_performance.disk_write_io_throttled_sec

# This aligns with locks object
sqlserver_performance.lock_wait_count

# This comes from the general statistics object
sqlserver_performance.processes_blocked

# This comes from SQL server properties
sqlserver_server_properties.db_offline
sqlserver_server_properties.db_online
sqlserver_server_properties.db_recovering
sqlserver_server_properties.db_recoverypending
sqlserver_server_properties.db_restoring
sqlserver_server_properties.db_suspect

Metric sources and documentation references
IO metrics defined
Performance metrics defined here, here for resource pools, here for locks, and here for general statistics.
Server DB properties are described in the SQLServerProperties bullet point here in the README, and here in code.

I believe we'd want all of these metrics disabled by default, but it's up for discussion.

Note
If there metrics are acceptable, we'll want to also define metric names that match OTEL semantics.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions