diff --git a/.chloggen/sqlserver_add_io_metrics.yaml b/.chloggen/sqlserver_add_io_metrics.yaml new file mode 100644 index 000000000000..a66fefaefe07 --- /dev/null +++ b/.chloggen/sqlserver_add_io_metrics.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: sqlserverreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: sqlserver.database.io.read_latency has been renamed to sqlserver.database.latency with a `direction` attribute. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29865] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/sqlserver_io_metrics.yaml b/.chloggen/sqlserver_io_metrics.yaml new file mode 100644 index 000000000000..fefc081a69ef --- /dev/null +++ b/.chloggen/sqlserver_io_metrics.yaml @@ -0,0 +1,31 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: sqlserverreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for more Database IO metrics + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29865] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + The following metrics have been added: + - sqlserver.database.latency + - sqlserver.database.io + - sqlserver.database.operations + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/receiver/sqlserverreceiver/documentation.md b/receiver/sqlserverreceiver/documentation.md index 036e09733671..e1e2f816880d 100644 --- a/receiver/sqlserverreceiver/documentation.md +++ b/receiver/sqlserverreceiver/documentation.md @@ -242,9 +242,28 @@ This metric is only available when the receiver is configured to directly connec | ---- | ----------- | ------ | | database.status | The current status of a database | Str: ``online``, ``restoring``, ``recovering``, ``pending_recovery``, ``suspect``, ``offline`` | -### sqlserver.database.io.read_latency +### sqlserver.database.io -Total time that the users waited for reads issued on this file. +The number of bytes of I/O on this file. + +This metric is only available when the receiver is configured to directly connect to SQL Server. + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| By | Sum | Int | Cumulative | true | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| physical_filename | The physical filename of the file being monitored. | Any Str | +| logical_filename | The logical filename of the file being monitored. | Any Str | +| file_type | The type of file being monitored. | Any Str | +| direction | The direction of flow of bytes or operations. | Str: ``read``, ``write`` | + +### sqlserver.database.latency + +Total time that the users waited for I/O issued on this file. This metric is only available when the receiver is configured to directly connect to SQL Server. @@ -259,6 +278,26 @@ This metric is only available when the receiver is configured to directly connec | physical_filename | The physical filename of the file being monitored. | Any Str | | logical_filename | The logical filename of the file being monitored. | Any Str | | file_type | The type of file being monitored. | Any Str | +| direction | The direction of flow of bytes or operations. | Str: ``read``, ``write`` | + +### sqlserver.database.operations + +The number of operations issued on the file. + +This metric is only available when the receiver is configured to directly connect to SQL Server. + +| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | +| ---- | ----------- | ---------- | ----------------------- | --------- | +| {operations} | Sum | Int | Cumulative | true | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| physical_filename | The physical filename of the file being monitored. | Any Str | +| logical_filename | The logical filename of the file being monitored. | Any Str | +| file_type | The type of file being monitored. | Any Str | +| direction | The direction of flow of bytes or operations. | Str: ``read``, ``write`` | ### sqlserver.processes.blocked diff --git a/receiver/sqlserverreceiver/factory.go b/receiver/sqlserverreceiver/factory.go index 104f0efcd06e..f3e97ec5c7e3 100644 --- a/receiver/sqlserverreceiver/factory.go +++ b/receiver/sqlserverreceiver/factory.go @@ -39,7 +39,7 @@ func createDefaultConfig() component.Config { func setupQueries(cfg *Config) []string { var queries []string - if cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseIoReadLatency.Enabled { + if isDatabaseIOQueryEnabled(&cfg.MetricsBuilderConfig.Metrics) { queries = append(queries, getSQLServerDatabaseIOQuery(cfg.InstanceName)) } @@ -129,3 +129,12 @@ func setupScrapers(params receiver.CreateSettings, cfg *Config) ([]scraperhelper return opts, nil } + +func isDatabaseIOQueryEnabled(metrics *metadata.MetricsConfig) bool { + if metrics.SqlserverDatabaseLatency.Enabled || + metrics.SqlserverDatabaseOperations.Enabled || + metrics.SqlserverDatabaseIo.Enabled { + return true + } + return false +} diff --git a/receiver/sqlserverreceiver/factory_others_test.go b/receiver/sqlserverreceiver/factory_others_test.go index 9df167614d26..1b6c95952c52 100644 --- a/receiver/sqlserverreceiver/factory_others_test.go +++ b/receiver/sqlserverreceiver/factory_others_test.go @@ -30,7 +30,7 @@ func TestCreateMetricsReceiverOtherOS(t *testing.T) { cfg.Server = "0.0.0.0" cfg.Port = 1433 cfg.InstanceName = "instanceName" - cfg.Metrics.SqlserverDatabaseIoReadLatency.Enabled = true + cfg.Metrics.SqlserverDatabaseLatency.Enabled = true require.NoError(t, cfg.Validate()) require.True(t, directDBConnectionEnabled(cfg)) diff --git a/receiver/sqlserverreceiver/factory_test.go b/receiver/sqlserverreceiver/factory_test.go index 74044aa1da27..311bc1b4d078 100644 --- a/receiver/sqlserverreceiver/factory_test.go +++ b/receiver/sqlserverreceiver/factory_test.go @@ -87,7 +87,7 @@ func TestCreateMetricsReceiver(t *testing.T) { cfg.Server = "0.0.0.0" cfg.Port = 1433 require.NoError(t, cfg.Validate()) - cfg.Metrics.SqlserverDatabaseIoReadLatency.Enabled = true + cfg.Metrics.SqlserverDatabaseLatency.Enabled = true require.True(t, directDBConnectionEnabled(cfg)) require.Equal(t, "server=0.0.0.0;user id=sa;password=password;port=1433", getDBConnectionString(cfg)) diff --git a/receiver/sqlserverreceiver/internal/metadata/generated_config.go b/receiver/sqlserverreceiver/internal/metadata/generated_config.go index 65d7ab429d51..d1f0e534f840 100644 --- a/receiver/sqlserverreceiver/internal/metadata/generated_config.go +++ b/receiver/sqlserverreceiver/internal/metadata/generated_config.go @@ -32,7 +32,9 @@ type MetricsConfig struct { SqlserverBatchSQLCompilationRate MetricConfig `mapstructure:"sqlserver.batch.sql_compilation.rate"` SqlserverBatchSQLRecompilationRate MetricConfig `mapstructure:"sqlserver.batch.sql_recompilation.rate"` SqlserverDatabaseCount MetricConfig `mapstructure:"sqlserver.database.count"` - SqlserverDatabaseIoReadLatency MetricConfig `mapstructure:"sqlserver.database.io.read_latency"` + SqlserverDatabaseIo MetricConfig `mapstructure:"sqlserver.database.io"` + SqlserverDatabaseLatency MetricConfig `mapstructure:"sqlserver.database.latency"` + SqlserverDatabaseOperations MetricConfig `mapstructure:"sqlserver.database.operations"` SqlserverLockWaitRate MetricConfig `mapstructure:"sqlserver.lock.wait.rate"` SqlserverLockWaitTimeAvg MetricConfig `mapstructure:"sqlserver.lock.wait_time.avg"` SqlserverPageBufferCacheHitRatio MetricConfig `mapstructure:"sqlserver.page.buffer_cache.hit_ratio"` @@ -69,7 +71,13 @@ func DefaultMetricsConfig() MetricsConfig { SqlserverDatabaseCount: MetricConfig{ Enabled: false, }, - SqlserverDatabaseIoReadLatency: MetricConfig{ + SqlserverDatabaseIo: MetricConfig{ + Enabled: false, + }, + SqlserverDatabaseLatency: MetricConfig{ + Enabled: false, + }, + SqlserverDatabaseOperations: MetricConfig{ Enabled: false, }, SqlserverLockWaitRate: MetricConfig{ diff --git a/receiver/sqlserverreceiver/internal/metadata/generated_config_test.go b/receiver/sqlserverreceiver/internal/metadata/generated_config_test.go index 6b2174c4c5b1..af5c776063e3 100644 --- a/receiver/sqlserverreceiver/internal/metadata/generated_config_test.go +++ b/receiver/sqlserverreceiver/internal/metadata/generated_config_test.go @@ -29,7 +29,9 @@ func TestMetricsBuilderConfig(t *testing.T) { SqlserverBatchSQLCompilationRate: MetricConfig{Enabled: true}, SqlserverBatchSQLRecompilationRate: MetricConfig{Enabled: true}, SqlserverDatabaseCount: MetricConfig{Enabled: true}, - SqlserverDatabaseIoReadLatency: MetricConfig{Enabled: true}, + SqlserverDatabaseIo: MetricConfig{Enabled: true}, + SqlserverDatabaseLatency: MetricConfig{Enabled: true}, + SqlserverDatabaseOperations: MetricConfig{Enabled: true}, SqlserverLockWaitRate: MetricConfig{Enabled: true}, SqlserverLockWaitTimeAvg: MetricConfig{Enabled: true}, SqlserverPageBufferCacheHitRatio: MetricConfig{Enabled: true}, @@ -66,7 +68,9 @@ func TestMetricsBuilderConfig(t *testing.T) { SqlserverBatchSQLCompilationRate: MetricConfig{Enabled: false}, SqlserverBatchSQLRecompilationRate: MetricConfig{Enabled: false}, SqlserverDatabaseCount: MetricConfig{Enabled: false}, - SqlserverDatabaseIoReadLatency: MetricConfig{Enabled: false}, + SqlserverDatabaseIo: MetricConfig{Enabled: false}, + SqlserverDatabaseLatency: MetricConfig{Enabled: false}, + SqlserverDatabaseOperations: MetricConfig{Enabled: false}, SqlserverLockWaitRate: MetricConfig{Enabled: false}, SqlserverLockWaitTimeAvg: MetricConfig{Enabled: false}, SqlserverPageBufferCacheHitRatio: MetricConfig{Enabled: false}, diff --git a/receiver/sqlserverreceiver/internal/metadata/generated_metrics.go b/receiver/sqlserverreceiver/internal/metadata/generated_metrics.go index 97b5907cd787..cb5e601295ea 100644 --- a/receiver/sqlserverreceiver/internal/metadata/generated_metrics.go +++ b/receiver/sqlserverreceiver/internal/metadata/generated_metrics.go @@ -56,6 +56,32 @@ var MapAttributeDatabaseStatus = map[string]AttributeDatabaseStatus{ "offline": AttributeDatabaseStatusOffline, } +// AttributeDirection specifies the a value direction attribute. +type AttributeDirection int + +const ( + _ AttributeDirection = iota + AttributeDirectionRead + AttributeDirectionWrite +) + +// String returns the string representation of the AttributeDirection. +func (av AttributeDirection) String() string { + switch av { + case AttributeDirectionRead: + return "read" + case AttributeDirectionWrite: + return "write" + } + return "" +} + +// MapAttributeDirection is a helper map of string to AttributeDirection attribute value. +var MapAttributeDirection = map[string]AttributeDirection{ + "read": AttributeDirectionRead, + "write": AttributeDirectionWrite, +} + // AttributePageOperations specifies the a value page.operations attribute. type AttributePageOperations int @@ -280,16 +306,72 @@ func newMetricSqlserverDatabaseCount(cfg MetricConfig) metricSqlserverDatabaseCo return m } -type metricSqlserverDatabaseIoReadLatency struct { +type metricSqlserverDatabaseIo struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills sqlserver.database.io metric with initial data. +func (m *metricSqlserverDatabaseIo) init() { + m.data.SetName("sqlserver.database.io") + m.data.SetDescription("The number of bytes of I/O on this file.") + m.data.SetUnit("By") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricSqlserverDatabaseIo) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue string) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) + dp.Attributes().PutStr("physical_filename", physicalFilenameAttributeValue) + dp.Attributes().PutStr("logical_filename", logicalFilenameAttributeValue) + dp.Attributes().PutStr("file_type", fileTypeAttributeValue) + dp.Attributes().PutStr("direction", directionAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricSqlserverDatabaseIo) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricSqlserverDatabaseIo) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricSqlserverDatabaseIo(cfg MetricConfig) metricSqlserverDatabaseIo { + m := metricSqlserverDatabaseIo{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricSqlserverDatabaseLatency struct { data pmetric.Metric // data buffer for generated metric. config MetricConfig // metric config provided by user. capacity int // max observed number of data points added to the metric. } -// init fills sqlserver.database.io.read_latency metric with initial data. -func (m *metricSqlserverDatabaseIoReadLatency) init() { - m.data.SetName("sqlserver.database.io.read_latency") - m.data.SetDescription("Total time that the users waited for reads issued on this file.") +// init fills sqlserver.database.latency metric with initial data. +func (m *metricSqlserverDatabaseLatency) init() { + m.data.SetName("sqlserver.database.latency") + m.data.SetDescription("Total time that the users waited for I/O issued on this file.") m.data.SetUnit("s") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -297,7 +379,7 @@ func (m *metricSqlserverDatabaseIoReadLatency) init() { m.data.Sum().DataPoints().EnsureCapacity(m.capacity) } -func (m *metricSqlserverDatabaseIoReadLatency) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string) { +func (m *metricSqlserverDatabaseLatency) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val float64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue string) { if !m.config.Enabled { return } @@ -308,17 +390,18 @@ func (m *metricSqlserverDatabaseIoReadLatency) recordDataPoint(start pcommon.Tim dp.Attributes().PutStr("physical_filename", physicalFilenameAttributeValue) dp.Attributes().PutStr("logical_filename", logicalFilenameAttributeValue) dp.Attributes().PutStr("file_type", fileTypeAttributeValue) + dp.Attributes().PutStr("direction", directionAttributeValue) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. -func (m *metricSqlserverDatabaseIoReadLatency) updateCapacity() { +func (m *metricSqlserverDatabaseLatency) updateCapacity() { if m.data.Sum().DataPoints().Len() > m.capacity { m.capacity = m.data.Sum().DataPoints().Len() } } // emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. -func (m *metricSqlserverDatabaseIoReadLatency) emit(metrics pmetric.MetricSlice) { +func (m *metricSqlserverDatabaseLatency) emit(metrics pmetric.MetricSlice) { if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { m.updateCapacity() m.data.MoveTo(metrics.AppendEmpty()) @@ -326,8 +409,64 @@ func (m *metricSqlserverDatabaseIoReadLatency) emit(metrics pmetric.MetricSlice) } } -func newMetricSqlserverDatabaseIoReadLatency(cfg MetricConfig) metricSqlserverDatabaseIoReadLatency { - m := metricSqlserverDatabaseIoReadLatency{config: cfg} +func newMetricSqlserverDatabaseLatency(cfg MetricConfig) metricSqlserverDatabaseLatency { + m := metricSqlserverDatabaseLatency{config: cfg} + if cfg.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricSqlserverDatabaseOperations struct { + data pmetric.Metric // data buffer for generated metric. + config MetricConfig // metric config provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills sqlserver.database.operations metric with initial data. +func (m *metricSqlserverDatabaseOperations) init() { + m.data.SetName("sqlserver.database.operations") + m.data.SetDescription("The number of operations issued on the file.") + m.data.SetUnit("{operations}") + m.data.SetEmptySum() + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricSqlserverDatabaseOperations) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue string) { + if !m.config.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntValue(val) + dp.Attributes().PutStr("physical_filename", physicalFilenameAttributeValue) + dp.Attributes().PutStr("logical_filename", logicalFilenameAttributeValue) + dp.Attributes().PutStr("file_type", fileTypeAttributeValue) + dp.Attributes().PutStr("direction", directionAttributeValue) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricSqlserverDatabaseOperations) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricSqlserverDatabaseOperations) emit(metrics pmetric.MetricSlice) { + if m.config.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricSqlserverDatabaseOperations(cfg MetricConfig) metricSqlserverDatabaseOperations { + m := metricSqlserverDatabaseOperations{config: cfg} if cfg.Enabled { m.data = pmetric.NewMetric() m.init() @@ -1335,7 +1474,9 @@ type MetricsBuilder struct { metricSqlserverBatchSQLCompilationRate metricSqlserverBatchSQLCompilationRate metricSqlserverBatchSQLRecompilationRate metricSqlserverBatchSQLRecompilationRate metricSqlserverDatabaseCount metricSqlserverDatabaseCount - metricSqlserverDatabaseIoReadLatency metricSqlserverDatabaseIoReadLatency + metricSqlserverDatabaseIo metricSqlserverDatabaseIo + metricSqlserverDatabaseLatency metricSqlserverDatabaseLatency + metricSqlserverDatabaseOperations metricSqlserverDatabaseOperations metricSqlserverLockWaitRate metricSqlserverLockWaitRate metricSqlserverLockWaitTimeAvg metricSqlserverLockWaitTimeAvg metricSqlserverPageBufferCacheHitRatio metricSqlserverPageBufferCacheHitRatio @@ -1378,7 +1519,9 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.CreateSetting metricSqlserverBatchSQLCompilationRate: newMetricSqlserverBatchSQLCompilationRate(mbc.Metrics.SqlserverBatchSQLCompilationRate), metricSqlserverBatchSQLRecompilationRate: newMetricSqlserverBatchSQLRecompilationRate(mbc.Metrics.SqlserverBatchSQLRecompilationRate), metricSqlserverDatabaseCount: newMetricSqlserverDatabaseCount(mbc.Metrics.SqlserverDatabaseCount), - metricSqlserverDatabaseIoReadLatency: newMetricSqlserverDatabaseIoReadLatency(mbc.Metrics.SqlserverDatabaseIoReadLatency), + metricSqlserverDatabaseIo: newMetricSqlserverDatabaseIo(mbc.Metrics.SqlserverDatabaseIo), + metricSqlserverDatabaseLatency: newMetricSqlserverDatabaseLatency(mbc.Metrics.SqlserverDatabaseLatency), + metricSqlserverDatabaseOperations: newMetricSqlserverDatabaseOperations(mbc.Metrics.SqlserverDatabaseOperations), metricSqlserverLockWaitRate: newMetricSqlserverLockWaitRate(mbc.Metrics.SqlserverLockWaitRate), metricSqlserverLockWaitTimeAvg: newMetricSqlserverLockWaitTimeAvg(mbc.Metrics.SqlserverLockWaitTimeAvg), metricSqlserverPageBufferCacheHitRatio: newMetricSqlserverPageBufferCacheHitRatio(mbc.Metrics.SqlserverPageBufferCacheHitRatio), @@ -1485,7 +1628,9 @@ func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { mb.metricSqlserverBatchSQLCompilationRate.emit(ils.Metrics()) mb.metricSqlserverBatchSQLRecompilationRate.emit(ils.Metrics()) mb.metricSqlserverDatabaseCount.emit(ils.Metrics()) - mb.metricSqlserverDatabaseIoReadLatency.emit(ils.Metrics()) + mb.metricSqlserverDatabaseIo.emit(ils.Metrics()) + mb.metricSqlserverDatabaseLatency.emit(ils.Metrics()) + mb.metricSqlserverDatabaseOperations.emit(ils.Metrics()) mb.metricSqlserverLockWaitRate.emit(ils.Metrics()) mb.metricSqlserverLockWaitTimeAvg.emit(ils.Metrics()) mb.metricSqlserverPageBufferCacheHitRatio.emit(ils.Metrics()) @@ -1562,9 +1707,29 @@ func (mb *MetricsBuilder) RecordSqlserverDatabaseCountDataPoint(ts pcommon.Times return nil } -// RecordSqlserverDatabaseIoReadLatencyDataPoint adds a data point to sqlserver.database.io.read_latency metric. -func (mb *MetricsBuilder) RecordSqlserverDatabaseIoReadLatencyDataPoint(ts pcommon.Timestamp, val float64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string) { - mb.metricSqlserverDatabaseIoReadLatency.recordDataPoint(mb.startTime, ts, val, physicalFilenameAttributeValue, logicalFilenameAttributeValue, fileTypeAttributeValue) +// RecordSqlserverDatabaseIoDataPoint adds a data point to sqlserver.database.io metric. +func (mb *MetricsBuilder) RecordSqlserverDatabaseIoDataPoint(ts pcommon.Timestamp, inputVal string, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue AttributeDirection) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for SqlserverDatabaseIo, value was %s: %w", inputVal, err) + } + mb.metricSqlserverDatabaseIo.recordDataPoint(mb.startTime, ts, val, physicalFilenameAttributeValue, logicalFilenameAttributeValue, fileTypeAttributeValue, directionAttributeValue.String()) + return nil +} + +// RecordSqlserverDatabaseLatencyDataPoint adds a data point to sqlserver.database.latency metric. +func (mb *MetricsBuilder) RecordSqlserverDatabaseLatencyDataPoint(ts pcommon.Timestamp, val float64, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue AttributeDirection) { + mb.metricSqlserverDatabaseLatency.recordDataPoint(mb.startTime, ts, val, physicalFilenameAttributeValue, logicalFilenameAttributeValue, fileTypeAttributeValue, directionAttributeValue.String()) +} + +// RecordSqlserverDatabaseOperationsDataPoint adds a data point to sqlserver.database.operations metric. +func (mb *MetricsBuilder) RecordSqlserverDatabaseOperationsDataPoint(ts pcommon.Timestamp, inputVal string, physicalFilenameAttributeValue string, logicalFilenameAttributeValue string, fileTypeAttributeValue string, directionAttributeValue AttributeDirection) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for SqlserverDatabaseOperations, value was %s: %w", inputVal, err) + } + mb.metricSqlserverDatabaseOperations.recordDataPoint(mb.startTime, ts, val, physicalFilenameAttributeValue, logicalFilenameAttributeValue, fileTypeAttributeValue, directionAttributeValue.String()) + return nil } // RecordSqlserverLockWaitRateDataPoint adds a data point to sqlserver.lock.wait.rate metric. diff --git a/receiver/sqlserverreceiver/internal/metadata/generated_metrics_test.go b/receiver/sqlserverreceiver/internal/metadata/generated_metrics_test.go index b7cc17409a29..f5620391d36a 100644 --- a/receiver/sqlserverreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/sqlserverreceiver/internal/metadata/generated_metrics_test.go @@ -84,7 +84,13 @@ func TestMetricsBuilder(t *testing.T) { mb.RecordSqlserverDatabaseCountDataPoint(ts, "1", AttributeDatabaseStatusOnline) allMetricsCount++ - mb.RecordSqlserverDatabaseIoReadLatencyDataPoint(ts, 1, "physical_filename-val", "logical_filename-val", "file_type-val") + mb.RecordSqlserverDatabaseIoDataPoint(ts, "1", "physical_filename-val", "logical_filename-val", "file_type-val", AttributeDirectionRead) + + allMetricsCount++ + mb.RecordSqlserverDatabaseLatencyDataPoint(ts, 1, "physical_filename-val", "logical_filename-val", "file_type-val", AttributeDirectionRead) + + allMetricsCount++ + mb.RecordSqlserverDatabaseOperationsDataPoint(ts, "1", "physical_filename-val", "logical_filename-val", "file_type-val", AttributeDirectionRead) defaultMetricsCount++ allMetricsCount++ @@ -240,12 +246,38 @@ func TestMetricsBuilder(t *testing.T) { attrVal, ok := dp.Attributes().Get("database.status") assert.True(t, ok) assert.EqualValues(t, "online", attrVal.Str()) - case "sqlserver.database.io.read_latency": - assert.False(t, validatedMetrics["sqlserver.database.io.read_latency"], "Found a duplicate in the metrics slice: sqlserver.database.io.read_latency") - validatedMetrics["sqlserver.database.io.read_latency"] = true + case "sqlserver.database.io": + assert.False(t, validatedMetrics["sqlserver.database.io"], "Found a duplicate in the metrics slice: sqlserver.database.io") + validatedMetrics["sqlserver.database.io"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "The number of bytes of I/O on this file.", ms.At(i).Description()) + assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + attrVal, ok := dp.Attributes().Get("physical_filename") + assert.True(t, ok) + assert.EqualValues(t, "physical_filename-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("logical_filename") + assert.True(t, ok) + assert.EqualValues(t, "logical_filename-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("file_type") + assert.True(t, ok) + assert.EqualValues(t, "file_type-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("direction") + assert.True(t, ok) + assert.EqualValues(t, "read", attrVal.Str()) + case "sqlserver.database.latency": + assert.False(t, validatedMetrics["sqlserver.database.latency"], "Found a duplicate in the metrics slice: sqlserver.database.latency") + validatedMetrics["sqlserver.database.latency"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Total time that the users waited for reads issued on this file.", ms.At(i).Description()) + assert.Equal(t, "Total time that the users waited for I/O issued on this file.", ms.At(i).Description()) assert.Equal(t, "s", ms.At(i).Unit()) assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -263,6 +295,35 @@ func TestMetricsBuilder(t *testing.T) { attrVal, ok = dp.Attributes().Get("file_type") assert.True(t, ok) assert.EqualValues(t, "file_type-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("direction") + assert.True(t, ok) + assert.EqualValues(t, "read", attrVal.Str()) + case "sqlserver.database.operations": + assert.False(t, validatedMetrics["sqlserver.database.operations"], "Found a duplicate in the metrics slice: sqlserver.database.operations") + validatedMetrics["sqlserver.database.operations"] = true + assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) + assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) + assert.Equal(t, "The number of operations issued on the file.", ms.At(i).Description()) + assert.Equal(t, "{operations}", ms.At(i).Unit()) + assert.Equal(t, true, ms.At(i).Sum().IsMonotonic()) + assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) + dp := ms.At(i).Sum().DataPoints().At(0) + assert.Equal(t, start, dp.StartTimestamp()) + assert.Equal(t, ts, dp.Timestamp()) + assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType()) + assert.Equal(t, int64(1), dp.IntValue()) + attrVal, ok := dp.Attributes().Get("physical_filename") + assert.True(t, ok) + assert.EqualValues(t, "physical_filename-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("logical_filename") + assert.True(t, ok) + assert.EqualValues(t, "logical_filename-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("file_type") + assert.True(t, ok) + assert.EqualValues(t, "file_type-val", attrVal.Str()) + attrVal, ok = dp.Attributes().Get("direction") + assert.True(t, ok) + assert.EqualValues(t, "read", attrVal.Str()) case "sqlserver.lock.wait.rate": assert.False(t, validatedMetrics["sqlserver.lock.wait.rate"], "Found a duplicate in the metrics slice: sqlserver.lock.wait.rate") validatedMetrics["sqlserver.lock.wait.rate"] = true diff --git a/receiver/sqlserverreceiver/internal/metadata/testdata/config.yaml b/receiver/sqlserverreceiver/internal/metadata/testdata/config.yaml index 449b7e435a9b..f40796045269 100644 --- a/receiver/sqlserverreceiver/internal/metadata/testdata/config.yaml +++ b/receiver/sqlserverreceiver/internal/metadata/testdata/config.yaml @@ -9,7 +9,11 @@ all_set: enabled: true sqlserver.database.count: enabled: true - sqlserver.database.io.read_latency: + sqlserver.database.io: + enabled: true + sqlserver.database.latency: + enabled: true + sqlserver.database.operations: enabled: true sqlserver.lock.wait.rate: enabled: true @@ -68,7 +72,11 @@ none_set: enabled: false sqlserver.database.count: enabled: false - sqlserver.database.io.read_latency: + sqlserver.database.io: + enabled: false + sqlserver.database.latency: + enabled: false + sqlserver.database.operations: enabled: false sqlserver.lock.wait.rate: enabled: false diff --git a/receiver/sqlserverreceiver/metadata.yaml b/receiver/sqlserverreceiver/metadata.yaml index b8f063526d91..a71a8b5f3e65 100644 --- a/receiver/sqlserverreceiver/metadata.yaml +++ b/receiver/sqlserverreceiver/metadata.yaml @@ -43,6 +43,10 @@ attributes: description: The current status of a database type: string enum: [online, restoring, recovering, pending_recovery, suspect, offline] + direction: + description: The direction of flow of bytes or operations. + type: string + enum: [read, write] metrics: sqlserver.user.connection.count: @@ -189,15 +193,37 @@ metrics: gauge: value_type: double extended_documentation: This metric is only available when running on Windows. - sqlserver.database.io.read_latency: + sqlserver.database.latency: enabled: false - description: Total time that the users waited for reads issued on this file. + description: Total time that the users waited for I/O issued on this file. unit: "s" sum: monotonic: true aggregation_temporality: cumulative value_type: double - attributes: [physical_filename, logical_filename, file_type] + attributes: [physical_filename, logical_filename, file_type, direction] + extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server. + sqlserver.database.operations: + enabled: false + description: The number of operations issued on the file. + unit: "{operations}" + sum: + monotonic: true + aggregation_temporality: cumulative + value_type: int + input_type: string + attributes: [ physical_filename, logical_filename, file_type, direction ] + extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server. + sqlserver.database.io: + enabled: false + description: The number of bytes of I/O on this file. + unit: "By" + sum: + monotonic: true + aggregation_temporality: cumulative + value_type: int + input_type: string + attributes: [ physical_filename, logical_filename, file_type, direction ] extended_documentation: This metric is only available when the receiver is configured to directly connect to SQL Server. sqlserver.resource_pool.disk.throttled.read.rate: enabled: false diff --git a/receiver/sqlserverreceiver/scraper.go b/receiver/sqlserverreceiver/scraper.go index 3a69e87b0eb8..c0a0aea32df5 100644 --- a/receiver/sqlserverreceiver/scraper.go +++ b/receiver/sqlserverreceiver/scraper.go @@ -114,6 +114,11 @@ func (s *sqlServerScraperHelper) recordDatabaseIOMetrics(ctx context.Context, rb const logicalFilenameKey = "logical_filename" const fileTypeKey = "file_type" const readLatencyMsKey = "read_latency_ms" + const writeLatencyMsKey = "write_latency_ms" + const readCountKey = "reads" + const writeCountKey = "writes" + const readBytesKey = "read_bytes" + const writeBytesKey = "write_bytes" rows, err := s.client.QueryRows(ctx) if err != nil { @@ -139,8 +144,21 @@ func (s *sqlServerScraperHelper) recordDatabaseIOMetrics(ctx context.Context, rb err = fmt.Errorf("row %d: %w", i, err) errs = append(errs, err) } else { - s.mb.RecordSqlserverDatabaseIoReadLatencyDataPoint(now, val/1e3, row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey]) + s.mb.RecordSqlserverDatabaseLatencyDataPoint(now, val/1e3, row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionRead) } + + val, err = strconv.ParseFloat(row[writeLatencyMsKey], 64) + if err != nil { + err = fmt.Errorf("row %d: %w", i, err) + errs = append(errs, err) + } else { + s.mb.RecordSqlserverDatabaseLatencyDataPoint(now, val/1e3, row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionWrite) + } + + errs = append(errs, s.mb.RecordSqlserverDatabaseOperationsDataPoint(now, row[readCountKey], row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionRead)) + errs = append(errs, s.mb.RecordSqlserverDatabaseOperationsDataPoint(now, row[writeCountKey], row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionWrite)) + errs = append(errs, s.mb.RecordSqlserverDatabaseIoDataPoint(now, row[readBytesKey], row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionRead)) + errs = append(errs, s.mb.RecordSqlserverDatabaseIoDataPoint(now, row[writeBytesKey], row[physicalFilenameKey], row[logicalFilenameKey], row[fileTypeKey], metadata.AttributeDirectionWrite)) } if len(rows) == 0 { diff --git a/receiver/sqlserverreceiver/scraper_test.go b/receiver/sqlserverreceiver/scraper_test.go index 5c09786cc73a..2b6a04f285c7 100644 --- a/receiver/sqlserverreceiver/scraper_test.go +++ b/receiver/sqlserverreceiver/scraper_test.go @@ -21,7 +21,9 @@ import ( ) func enableAllScraperMetrics(cfg *Config) { - cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseIoReadLatency.Enabled = true + cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseLatency.Enabled = true + cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseOperations.Enabled = true + cfg.MetricsBuilderConfig.Metrics.SqlserverDatabaseIo.Enabled = true cfg.MetricsBuilderConfig.Metrics.SqlserverResourcePoolDiskThrottledReadRate.Enabled = true cfg.MetricsBuilderConfig.Metrics.SqlserverResourcePoolDiskThrottledWriteRate.Enabled = true @@ -37,12 +39,11 @@ func TestEmptyScrape(t *testing.T) { cfg.Port = 1433 cfg.Server = "0.0.0.0" cfg.MetricsBuilderConfig.ResourceAttributes.SqlserverInstanceName.Enabled = true - assert.NoError(t, cfg.Validate()) // Ensure there aren't any scrapers when all metrics are disabled. - // The locks metric is the only scraper metric enabled by default, as it is reusing - // a performance counter metric, and can be gather either by perf counters, or + // The lock metric is the only scraper metric enabled by default, as it is reusing + // a performance counter metric and can be gathered either by perf counters or // by scraping. cfg.MetricsBuilderConfig.Metrics.SqlserverLockWaitRate.Enabled = false scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) @@ -59,8 +60,9 @@ func TestSuccessfulScrape(t *testing.T) { assert.NoError(t, cfg.Validate()) enableAllScraperMetrics(cfg) + scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) - assert.NotNil(t, scrapers) + assert.NotEmpty(t, scrapers) for _, scraper := range scrapers { err := scraper.Start(context.Background(), componenttest.NewNopHost()) @@ -107,7 +109,6 @@ func TestScrapeInvalidQuery(t *testing.T) { assert.NoError(t, cfg.Validate()) - // Ensure all metrics are received when all are enabled. enableAllScraperMetrics(cfg) scrapers := setupSQLServerScrapers(receivertest.NewNopCreateSettings(), cfg) assert.NotNil(t, scrapers) diff --git a/receiver/sqlserverreceiver/testdata/expectedDatabaseIO.yaml b/receiver/sqlserverreceiver/testdata/expectedDatabaseIO.yaml index 1fc196a61342..9fbd0ada6938 100644 --- a/receiver/sqlserverreceiver/testdata/expectedDatabaseIO.yaml +++ b/receiver/sqlserverreceiver/testdata/expectedDatabaseIO.yaml @@ -9,13 +9,990 @@ resourceMetrics: stringValue: 8cac97ac9b8f scopeMetrics: - metrics: - - description: Total time that the users waited for reads issued on this file. - name: sqlserver.database.io.read_latency + - description: The number of bytes of I/O on this file. + name: sqlserver.database.io + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "660992" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: MSDBLog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBLog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "916480" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: mastlog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/mastlog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "1150464" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: modellog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/modellog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "1007616" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: templog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/templog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "6840320" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: MSDBData + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBData.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "4022272" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: master + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/master.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "10575872" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: modeldev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/model.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "2113536" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev2 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb2.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev3 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb3.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev4 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb4.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev5 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb5.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev6 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb6.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev7 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb7.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "131072" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev8 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb8.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "1019904" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: MSDBLog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBLog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "8061952" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: mastlog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/mastlog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "968704" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: modellog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/modellog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "180224" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: templog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/templog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "991232" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: MSDBData + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBData.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "4096000" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: master + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/master.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "860160" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: modeldev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/model.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "32768" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev2 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb2.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev3 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb3.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev4 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb4.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev5 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb5.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev6 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb6.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev7 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb7.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "90112" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev8 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb8.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + isMonotonic: true + unit: By + - description: Total time that the users waited for I/O issued on this file. + name: sqlserver.database.latency sum: aggregationTemporality: 2 dataPoints: - asDouble: 0.005 attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: MSDBLog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBLog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.008 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: mastlog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/mastlog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.007 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: modellog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/modellog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: templog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/templog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.051 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: MSDBData + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBData.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.062 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: master + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/master.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.021 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: modeldev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/model.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.009 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev2 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb2.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev3 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb3.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev4 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb4.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev5 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb5.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev6 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb6.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev7 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb7.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev8 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb8.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.027 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: MSDBLog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBLog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 3.302 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: mastlog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/mastlog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.031 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: modellog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/modellog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.004 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: templog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/templog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.026 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: MSDBData + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBData.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.13 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: master + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/master.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.016 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: modeldev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/model.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev2 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb2.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev3 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb3.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev4 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb4.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev5 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb5.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev6 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb6.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.002 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev7 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb7.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.001 + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev8 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb8.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + isMonotonic: true + unit: s + - description: The number of operations issued on the file. + name: sqlserver.database.operations + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "9" + attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: LOG @@ -27,8 +1004,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/MSDBLog.ldf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.008 + - asInt: "17" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: LOG @@ -40,8 +1020,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/mastlog.ldf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.007 + - asInt: "11" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: LOG @@ -53,8 +1036,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/modellog.ldf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.002 + - asInt: "7" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: LOG @@ -66,8 +1052,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/templog.ldf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.051 + - asInt: "108" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -79,8 +1068,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/MSDBData.mdf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.062 + - asInt: "73" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -92,8 +1084,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/master.mdf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.021 + - asInt: "53" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -105,8 +1100,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/model.mdf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.009 + - asInt: "35" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -118,8 +1116,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb.mdf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.001 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -131,8 +1132,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb2.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.002 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -144,8 +1148,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb3.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.001 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -157,8 +1164,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb4.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.002 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -170,8 +1180,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb5.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.002 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -183,8 +1196,11 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb6.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.001 + - asInt: "9" attributes: + - key: direction + value: + stringValue: read - key: file_type value: stringValue: ROWS @@ -196,8 +1212,251 @@ resourceMetrics: stringValue: /var/opt/mssql/data/tempdb7.ndf startTimeUnixNano: "1000000" timeUnixNano: "2000000" - - asDouble: 0.001 + - asInt: "9" + attributes: + - key: direction + value: + stringValue: read + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev8 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb8.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "117" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: MSDBLog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBLog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "608" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: mastlog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/mastlog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "111" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: modellog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/modellog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "17" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: LOG + - key: logical_filename + value: + stringValue: templog + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/templog.ldf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "102" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: MSDBData + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/MSDBData.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "329" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: master + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/master.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "80" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: modeldev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/model.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "4" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb.mdf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev2 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb2.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev3 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb3.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev4 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb4.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev5 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb5.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev6 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb6.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" + attributes: + - key: direction + value: + stringValue: write + - key: file_type + value: + stringValue: ROWS + - key: logical_filename + value: + stringValue: tempdev7 + - key: physical_filename + value: + stringValue: /var/opt/mssql/data/tempdb7.ndf + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "11" attributes: + - key: direction + value: + stringValue: write - key: file_type value: stringValue: ROWS @@ -210,7 +1469,7 @@ resourceMetrics: startTimeUnixNano: "1000000" timeUnixNano: "2000000" isMonotonic: true - unit: s + unit: '{operations}' scope: name: otelcol/sqlserverreceiver version: latest