From af1bab0e2c9e341f601800d103203ebec747b97e Mon Sep 17 00:00:00 2001 From: naman47vyas Date: Fri, 14 Jun 2024 14:45:41 +0530 Subject: [PATCH] changed descriptions of metrics --- receiver/postgresqlreceiver/documentation.md | 18 ++++++------- .../internal/metadata/generated_metrics.go | 18 ++++++------- .../metadata/generated_metrics_test.go | 18 ++++++------- receiver/postgresqlreceiver/metadata.yaml | 25 +++++++------------ .../testdata/scraper/multiple/expected.yaml | 18 ++++++------- .../testdata/scraper/otel/expected.yaml | 18 ++++++------- .../otel/expected_default_metrics.yaml | 24 +++++++++--------- 7 files changed, 66 insertions(+), 73 deletions(-) diff --git a/receiver/postgresqlreceiver/documentation.md b/receiver/postgresqlreceiver/documentation.md index 0706f0a7378a..2d40f74b10fb 100644 --- a/receiver/postgresqlreceiver/documentation.md +++ b/receiver/postgresqlreceiver/documentation.md @@ -94,7 +94,7 @@ The number of blocks read. ### postgresql.buffer_hit -The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db. +The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -116,7 +116,7 @@ The number of commits. ### postgresql.connection.count -The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user +The count of active connections to this database. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -164,7 +164,7 @@ The size of the index on disk. ### postgresql.live_rows -Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table. +The approximate number of live rows, tagged with relation name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -192,7 +192,7 @@ The number of db row operations. ### postgresql.query.count -Number of times the statement was executed +Number of times the statement was executed. | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -207,7 +207,7 @@ Number of times the statement was executed ### postgresql.query.total_exec_time -The total wait time of the summarized timed events in nanaoseconds. +Total wait time of the normalised timed events in nanaoseconds. | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | @@ -258,7 +258,7 @@ The number of rows in the database. ### postgresql.rows_deleted -Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db. +Rows deleted by queries in this db, tagged with relation name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -272,7 +272,7 @@ Enabled with `relations`. The number of rows deleted by queries in this database ### postgresql.rows_fetched -The number of rows fetched by queries in this database. This metric is tagged with db. +Rows fetched by queries in this db, tagged with relation name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -286,7 +286,7 @@ The number of rows fetched by queries in this database. This metric is tagged wi ### postgresql.rows_inserted -Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db. +Rows inserted by queries in the db, tagged with relation name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | @@ -300,7 +300,7 @@ Enabled with `relations`. The number of rows inserted by queries in this databas ### postgresql.rows_updated -Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db. +Rows updated by queries in the db, tagged with relation name. | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | diff --git a/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go b/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go index fc6ae86bac2f..84fbca3cef44 100644 --- a/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go +++ b/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go @@ -611,7 +611,7 @@ type metricPostgresqlBufferHit struct { // init fills postgresql.buffer_hit metric with initial data. func (m *metricPostgresqlBufferHit) init() { m.data.SetName("postgresql.buffer_hit") - m.data.SetDescription("The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db.") + m.data.SetDescription("The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name.") m.data.SetUnit("{hit}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) @@ -713,7 +713,7 @@ type metricPostgresqlConnectionCount struct { // init fills postgresql.connection.count metric with initial data. func (m *metricPostgresqlConnectionCount) init() { m.data.SetName("postgresql.connection.count") - m.data.SetDescription("The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user") + m.data.SetDescription("The count of active connections to this database.") m.data.SetUnit("{connection}") m.data.SetEmptyGauge() } @@ -1064,7 +1064,7 @@ type metricPostgresqlLiveRows struct { // init fills postgresql.live_rows metric with initial data. func (m *metricPostgresqlLiveRows) init() { m.data.SetName("postgresql.live_rows") - m.data.SetDescription("Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table.") + m.data.SetDescription("The approximate number of live rows, tagged with relation name.") m.data.SetUnit("{row}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) @@ -1168,7 +1168,7 @@ type metricPostgresqlQueryCount struct { // init fills postgresql.query.count metric with initial data. func (m *metricPostgresqlQueryCount) init() { m.data.SetName("postgresql.query.count") - m.data.SetDescription("Number of times the statement was executed") + m.data.SetDescription("Number of times the statement was executed.") m.data.SetUnit("1") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1222,7 +1222,7 @@ type metricPostgresqlQueryTotalExecTime struct { // init fills postgresql.query.total_exec_time metric with initial data. func (m *metricPostgresqlQueryTotalExecTime) init() { m.data.SetName("postgresql.query.total_exec_time") - m.data.SetDescription("The total wait time of the summarized timed events in nanaoseconds.") + m.data.SetDescription("Total wait time of the normalised timed events in nanaoseconds.") m.data.SetUnit("ns") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) @@ -1431,7 +1431,7 @@ type metricPostgresqlRowsDeleted struct { // init fills postgresql.rows_deleted metric with initial data. func (m *metricPostgresqlRowsDeleted) init() { m.data.SetName("postgresql.rows_deleted") - m.data.SetDescription("Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db.") + m.data.SetDescription("Rows deleted by queries in this db, tagged with relation name.") m.data.SetUnit("{row}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) @@ -1482,7 +1482,7 @@ type metricPostgresqlRowsFetched struct { // init fills postgresql.rows_fetched metric with initial data. func (m *metricPostgresqlRowsFetched) init() { m.data.SetName("postgresql.rows_fetched") - m.data.SetDescription("The number of rows fetched by queries in this database. This metric is tagged with db.") + m.data.SetDescription("Rows fetched by queries in this db, tagged with relation name.") m.data.SetUnit("{row}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) @@ -1533,7 +1533,7 @@ type metricPostgresqlRowsInserted struct { // init fills postgresql.rows_inserted metric with initial data. func (m *metricPostgresqlRowsInserted) init() { m.data.SetName("postgresql.rows_inserted") - m.data.SetDescription("Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db.") + m.data.SetDescription("Rows inserted by queries in the db, tagged with relation name.") m.data.SetUnit("{row}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) @@ -1584,7 +1584,7 @@ type metricPostgresqlRowsUpdated struct { // init fills postgresql.rows_updated metric with initial data. func (m *metricPostgresqlRowsUpdated) init() { m.data.SetName("postgresql.rows_updated") - m.data.SetDescription("Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db.") + m.data.SetDescription("Rows updated by queries in the db, tagged with relation name.") m.data.SetUnit("{row}/s") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) diff --git a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go index 10df3eebc1ab..ff3a08903a0f 100644 --- a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go @@ -329,7 +329,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.buffer_hit"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db.", ms.At(i).Description()) + assert.Equal(t, "The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name.", ms.At(i).Description()) assert.Equal(t, "{hit}/s", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -358,7 +358,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.connection.count"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user", ms.At(i).Description()) + assert.Equal(t, "The count of active connections to this database.", ms.At(i).Description()) assert.Equal(t, "{connection}", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -450,7 +450,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.live_rows"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table.", ms.At(i).Description()) + assert.Equal(t, "The approximate number of live rows, tagged with relation name.", ms.At(i).Description()) assert.Equal(t, "{row}", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -482,7 +482,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.query.count"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "Number of times the statement was executed", ms.At(i).Description()) + assert.Equal(t, "Number of times the statement was executed.", ms.At(i).Description()) assert.Equal(t, "1", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -502,7 +502,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.query.total_exec_time"] = true assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) - assert.Equal(t, "The total wait time of the summarized timed events in nanaoseconds.", ms.At(i).Description()) + assert.Equal(t, "Total wait time of the normalised timed events in nanaoseconds.", ms.At(i).Description()) assert.Equal(t, "ns", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) @@ -568,7 +568,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.rows_deleted"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db.", ms.At(i).Description()) + assert.Equal(t, "Rows deleted by queries in this db, tagged with relation name.", ms.At(i).Description()) assert.Equal(t, "{row}/s", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -583,7 +583,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.rows_fetched"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "The number of rows fetched by queries in this database. This metric is tagged with db.", ms.At(i).Description()) + assert.Equal(t, "Rows fetched by queries in this db, tagged with relation name.", ms.At(i).Description()) assert.Equal(t, "{row}/s", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -598,7 +598,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.rows_inserted"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db.", ms.At(i).Description()) + assert.Equal(t, "Rows inserted by queries in the db, tagged with relation name.", ms.At(i).Description()) assert.Equal(t, "{row}/s", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) @@ -613,7 +613,7 @@ func TestMetricsBuilder(t *testing.T) { validatedMetrics["postgresql.rows_updated"] = true assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) - assert.Equal(t, "Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db.", ms.At(i).Description()) + assert.Equal(t, "Rows updated by queries in the db, tagged with relation name.", ms.At(i).Description()) assert.Equal(t, "{row}/s", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) diff --git a/receiver/postgresqlreceiver/metadata.yaml b/receiver/postgresqlreceiver/metadata.yaml index b6b8a4b2e0e7..c02a4c2a68e9 100644 --- a/receiver/postgresqlreceiver/metadata.yaml +++ b/receiver/postgresqlreceiver/metadata.yaml @@ -302,7 +302,7 @@ metrics: #DBM METRICS: postgresql.query.total_exec_time: enabled: true - description: The total wait time of the summarized timed events in nanaoseconds. + description: Total wait time of the normalised timed events in nanaoseconds. unit: ns sum: value_type: int @@ -312,7 +312,7 @@ metrics: postgresql.query.count: enabled: true - description: Number of times the statement was executed + description: Number of times the statement was executed. unit: 1 sum: value_type: int @@ -324,8 +324,7 @@ metrics: attributes: - relation_name enabled: true - description: Enabled with `relations`. The number of rows deleted by queries in - this database. This metric is tagged with db. + description: Rows deleted by queries in this db, tagged with relation name. unit: '{row}/s' gauge: value_type: int @@ -334,8 +333,7 @@ metrics: attributes: - relation_name enabled: true - description: The number of rows fetched by queries in this database. This metric - is tagged with db. + description: Rows fetched by queries in this db, tagged with relation name. unit: '{row}/s' gauge: value_type: int @@ -344,8 +342,7 @@ metrics: attributes: - relation_name enabled: true - description: Enabled with `relations`. The number of rows updated by queries in - this database. This metric is tagged with db. + description: Rows updated by queries in the db, tagged with relation name. unit: '{row}/s' gauge: value_type: int @@ -354,8 +351,7 @@ metrics: attributes: - relation_name enabled: true - description: Enabled with `relations`. The number of rows inserted by queries in - this database. This metric is tagged with db. + description: Rows inserted by queries in the db, tagged with relation name. unit: '{row}/s' gauge: value_type: int @@ -364,8 +360,7 @@ metrics: attributes: - relation_name enabled: true - description: Enabled with `relations`. The estimated number of live rows. This metric - is tagged with db, schema, table. + description: The approximate number of live rows, tagged with relation name. unit: '{row}' gauge: value_type: int @@ -374,16 +369,14 @@ metrics: attributes: - dbname enabled: true - description: The number of times disk blocks were found in the buffer cache, preventing - the need to read from the database. This metric is tagged with db. + description: The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name. unit: '{hit}/s' gauge: value_type: int postgresql.connection.count: enabled: true - description: The number of active connections to this database. If DBM is enabled, - this metric is tagged with state, app, db and user + description: The count of active connections to this database. unit: '{connection}' gauge: value_type: int \ No newline at end of file diff --git a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml index 61e7c38bcd85..ab3d28e2ef5b 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml @@ -9,7 +9,7 @@ resourceMetrics: stringValue: "16.3 (Ubuntu 16.3-1.pgdg22.04+1)" scopeMetrics: - metrics: - - description: The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user + - description: The count of active connections to this database. gauge: dataPoints: - asInt: "1" @@ -17,7 +17,7 @@ resourceMetrics: timeUnixNano: "2000000" name: postgresql.connection.count unit: '{connection}' - - description: The total wait time of the summarized timed events in nanaoseconds. + - description: Total wait time of the normalised timed events in nanaoseconds. name: postgresql.query.total_exec_time sum: aggregationTemporality: 2 @@ -53,7 +53,7 @@ resourceMetrics: value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" unit: ns - - description: Number of times the statement was executed + - description: Number of times the statement was executed. name: postgresql.query.count sum: aggregationTemporality: 2 @@ -89,7 +89,7 @@ resourceMetrics: value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" unit: "1" - - description: The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db. + - description: The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name. gauge: dataPoints: - asInt: "2148" @@ -114,7 +114,7 @@ resourceMetrics: stringValue: "template0" name: postgresql.buffer_hit unit: '{hit}/s' - - description: Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db. + - description: Rows deleted by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "88" @@ -124,7 +124,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_deleted unit: '{row}/s' - - description: The number of rows fetched by queries in this database. This metric is tagged with db. + - description: Rows fetched by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "0" @@ -134,7 +134,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_fetched unit: '{row}/s' - - description: Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db. + - description: Rows inserted by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "165" @@ -144,7 +144,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_inserted unit: '{row}/s' - - description: Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db. + - description: Rows updated by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "2" @@ -154,7 +154,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_updated unit: '{row}/s' - - description: Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table. + - description: The approximate number of live rows, tagged with relation name. gauge: dataPoints: - asInt: "77" diff --git a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml index 13a2990135f4..3bae7382a341 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml @@ -115,7 +115,7 @@ resourceMetrics: timeUnixNano: "2000000" name: postgresql.connection.max unit: '{connection}' - - description: The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user + - description: The count of active connections to this database. gauge: dataPoints: - asInt: "1" @@ -123,7 +123,7 @@ resourceMetrics: timeUnixNano: "2000000" name: postgresql.connection.count unit: '{connection}' - - description: The total wait time of the summarized timed events in nanaoseconds. + - description: Total wait time of the normalised timed events in nanaoseconds. name: postgresql.query.total_exec_time sum: aggregationTemporality: 2 @@ -159,7 +159,7 @@ resourceMetrics: value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" unit: ns - - description: Number of times the statement was executed + - description: Number of times the statement was executed. name: postgresql.query.count sum: aggregationTemporality: 2 @@ -195,7 +195,7 @@ resourceMetrics: value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" unit: "1" - - description: The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db. + - description: The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name. gauge: dataPoints: - asInt: "2148" @@ -220,7 +220,7 @@ resourceMetrics: stringValue: "template0" name: postgresql.buffer_hit unit: '{hit}/s' - - description: Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db. + - description: Rows deleted by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "88" @@ -230,7 +230,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_deleted unit: '{row}/s' - - description: The number of rows fetched by queries in this database. This metric is tagged with db. + - description: Rows fetched by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "0" @@ -240,7 +240,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_fetched unit: '{row}/s' - - description: Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db. + - description: Rows inserted by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "165" @@ -250,7 +250,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_inserted unit: '{row}/s' - - description: Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db. + - description: Rows updated by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "2" @@ -260,7 +260,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_updated unit: '{row}/s' - - description: Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table. + - description: The approximate number of live rows, tagged with relation name. gauge: dataPoints: - asInt: "77" diff --git a/receiver/postgresqlreceiver/testdata/scraper/otel/expected_default_metrics.yaml b/receiver/postgresqlreceiver/testdata/scraper/otel/expected_default_metrics.yaml index 135fab6fa9d1..f08e6b289e18 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/otel/expected_default_metrics.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/otel/expected_default_metrics.yaml @@ -9,15 +9,15 @@ resourceMetrics: stringValue: "16.3 (Ubuntu 16.3-1.pgdg22.04+1)" scopeMetrics: - metrics: - - description: The number of active connections to this database. If DBM is enabled, this metric is tagged with state, app, db and user + - description: The count of active connections to this database. gauge: dataPoints: - asInt: "1" startTimeUnixNano: "1000000" timeUnixNano: "2000000" name: postgresql.connection.count - unit: '{connection}' - - description: The total wait time of the summarized timed events in nanaoseconds. + unit: '{connection}' + - description: Total wait time of the normalised timed events in nanaoseconds. name: postgresql.query.total_exec_time sum: aggregationTemporality: 2 @@ -53,7 +53,7 @@ resourceMetrics: value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" unit: ns - - description: Number of times the statement was executed + - description: Number of times the statement was executed. name: postgresql.query.count sum: aggregationTemporality: 2 @@ -88,8 +88,8 @@ resourceMetrics: - key: query_text value: stringValue: "SELECT MIN(salary) AS lowest_salary_in_highest_paying_dept FROM employees WHERE department = (SELECT department FROM employees GROUP BY department ORDER BY AVG(salary) DESC LIMIT $1)" - unit: "1" - - description: The number of times disk blocks were found in the buffer cache, preventing the need to read from the database. This metric is tagged with db. + unit: "1" + - description: The number of disk block hits in the buffer cache, thereby avoiding database reads, tagged with database name. gauge: dataPoints: - asInt: "2148" @@ -114,7 +114,7 @@ resourceMetrics: stringValue: "template0" name: postgresql.buffer_hit unit: '{hit}/s' - - description: Enabled with `relations`. The number of rows deleted by queries in this database. This metric is tagged with db. + - description: Rows deleted by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "88" @@ -124,7 +124,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_deleted unit: '{row}/s' - - description: The number of rows fetched by queries in this database. This metric is tagged with db. + - description: Rows fetched by queries in this db, tagged with relation name. gauge: dataPoints: - asInt: "0" @@ -134,7 +134,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_fetched unit: '{row}/s' - - description: Enabled with `relations`. The number of rows inserted by queries in this database. This metric is tagged with db. + - description: Rows inserted by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "165" @@ -144,7 +144,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_inserted unit: '{row}/s' - - description: Enabled with `relations`. The number of rows updated by queries in this database. This metric is tagged with db. + - description: Rows updated by queries in the db, tagged with relation name. gauge: dataPoints: - asInt: "2" @@ -154,7 +154,7 @@ resourceMetrics: stringValue: public.table1 name: postgresql.rows_updated unit: '{row}/s' - - description: Enabled with `relations`. The estimated number of live rows. This metric is tagged with db, schema, table. + - description: The approximate number of live rows, tagged with relation name. gauge: dataPoints: - asInt: "77" @@ -163,7 +163,7 @@ resourceMetrics: value: stringValue: public.table1 name: postgresql.live_rows - unit: '{row}' + unit: '{row}' - description: Number of buffers allocated. name: postgresql.bgwriter.buffers.allocated sum: