From 097a7d60d5ae2a2373a0a3743c576a63cb05dfdb Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 13:20:58 +0200 Subject: [PATCH 01/12] Add missing unit in metadata.yaml Metric unit is required, see: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml#L72-L73. This PR adds the unit to all metrics where this is missing. I have inferred the unit from the metric name, and would appreciate that someone more familiar with the receivers in question review the chosen units. --- receiver/aerospikereceiver/documentation.md | 2 +- .../internal/metadata/generated_metrics.go | 2 +- .../metadata/generated_metrics_test.go | 2 +- receiver/aerospikereceiver/metadata.yaml | 1 + receiver/postgresqlreceiver/documentation.md | 4 +- .../internal/metadata/generated_metrics.go | 4 +- .../metadata/generated_metrics_test.go | 4 +- receiver/postgresqlreceiver/metadata.yaml | 2 + receiver/redisreceiver/documentation.md | 40 +++++++++---------- .../internal/metadata/generated_metrics.go | 40 +++++++++---------- .../metadata/generated_metrics_test.go | 40 +++++++++---------- receiver/redisreceiver/metadata.yaml | 39 +++++++++--------- 12 files changed, 92 insertions(+), 88 deletions(-) diff --git a/receiver/aerospikereceiver/documentation.md b/receiver/aerospikereceiver/documentation.md index ff4d818b760d..8532ecbd1826 100644 --- a/receiver/aerospikereceiver/documentation.md +++ b/receiver/aerospikereceiver/documentation.md @@ -189,7 +189,7 @@ Number of queries which ran more than query untracked_time (default 1 sec), Aero | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {queries} | Sum | Int | Cumulative | true | ## Resource Attributes diff --git a/receiver/aerospikereceiver/internal/metadata/generated_metrics.go b/receiver/aerospikereceiver/internal/metadata/generated_metrics.go index 12902729fae4..a5500be2f287 100644 --- a/receiver/aerospikereceiver/internal/metadata/generated_metrics.go +++ b/receiver/aerospikereceiver/internal/metadata/generated_metrics.go @@ -1029,7 +1029,7 @@ type metricAerospikeNodeQueryTracked struct { func (m *metricAerospikeNodeQueryTracked) init() { m.data.SetName("aerospike.node.query.tracked") m.data.SetDescription("Number of queries tracked by the system.") - m.data.SetUnit("") + m.data.SetUnit("{queries}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) diff --git a/receiver/aerospikereceiver/internal/metadata/generated_metrics_test.go b/receiver/aerospikereceiver/internal/metadata/generated_metrics_test.go index 823f6a4eb066..4db1efcc8100 100644 --- a/receiver/aerospikereceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/aerospikereceiver/internal/metadata/generated_metrics_test.go @@ -364,7 +364,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of queries tracked by the system.", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{queries}", 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) diff --git a/receiver/aerospikereceiver/metadata.yaml b/receiver/aerospikereceiver/metadata.yaml index a5b4a526453a..66244612f603 100644 --- a/receiver/aerospikereceiver/metadata.yaml +++ b/receiver/aerospikereceiver/metadata.yaml @@ -141,6 +141,7 @@ metrics: enabled: true description: Number of queries tracked by the system. extended_documentation: Number of queries which ran more than query untracked_time (default 1 sec), Aerospike metric query_tracked + unit: '{queries}' sum: value_type: int input_type: string diff --git a/receiver/postgresqlreceiver/documentation.md b/receiver/postgresqlreceiver/documentation.md index 7af3366b08b9..8fb633bec078 100644 --- a/receiver/postgresqlreceiver/documentation.md +++ b/receiver/postgresqlreceiver/documentation.md @@ -82,7 +82,7 @@ Number of times the background writer stopped a cleaning scan because it had wri | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {stoppages} | Sum | Int | Cumulative | true | ### postgresql.blocks_read @@ -226,7 +226,7 @@ Number of user tables in a database. | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {tables} | Sum | Int | Cumulative | false | ### postgresql.table.size diff --git a/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go b/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go index 2d9e26b92491..0a12b7e2b740 100644 --- a/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go +++ b/receiver/postgresqlreceiver/internal/metadata/generated_metrics.go @@ -510,7 +510,7 @@ type metricPostgresqlBgwriterMaxwritten struct { func (m *metricPostgresqlBgwriterMaxwritten) init() { m.data.SetName("postgresql.bgwriter.maxwritten") m.data.SetDescription("Number of times the background writer stopped a cleaning scan because it had written too many buffers.") - m.data.SetUnit("") + m.data.SetUnit("{stoppages}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -1136,7 +1136,7 @@ type metricPostgresqlTableCount struct { func (m *metricPostgresqlTableCount) init() { m.data.SetName("postgresql.table.count") m.data.SetDescription("Number of user tables in a database.") - m.data.SetUnit("") + m.data.SetUnit("{tables}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) diff --git a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go index ede19bfbb5bc..1d51d33174d3 100644 --- a/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/postgresqlreceiver/internal/metadata/generated_metrics_test.go @@ -276,7 +276,7 @@ func TestMetricsBuilder(t *testing.T) { 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 background writer stopped a cleaning scan because it had written too many buffers.", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{stoppages}", 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) @@ -477,7 +477,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of user tables in a database.", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{tables}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) diff --git a/receiver/postgresqlreceiver/metadata.yaml b/receiver/postgresqlreceiver/metadata.yaml index bc8b24bb64de..df3984c6b8d6 100644 --- a/receiver/postgresqlreceiver/metadata.yaml +++ b/receiver/postgresqlreceiver/metadata.yaml @@ -126,6 +126,7 @@ metrics: aggregation: cumulative monotonic: true value_type: int + unit: "{stoppages}" postgresql.blocks_read: enabled: true description: The number of blocks read. @@ -235,6 +236,7 @@ metrics: aggregation: cumulative monotonic: false value_type: int + unit: "{tables}" postgresql.table.size: attributes: [] description: Disk space used by a table. diff --git a/receiver/redisreceiver/documentation.md b/receiver/redisreceiver/documentation.md index 85e0345fcae6..ebac1f469dae 100644 --- a/receiver/redisreceiver/documentation.md +++ b/receiver/redisreceiver/documentation.md @@ -18,7 +18,7 @@ Number of clients pending on a blocking call | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {clients} | Sum | Int | Cumulative | false | ### redis.clients.connected @@ -26,7 +26,7 @@ Number of client connections (excluding connections from replicas) | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {connections} | Sum | Int | Cumulative | false | ### redis.clients.max_input_buffer @@ -34,7 +34,7 @@ Biggest input buffer among current client connections | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| By | Gauge | Int | ### redis.clients.max_output_buffer @@ -42,7 +42,7 @@ Longest output list among current client connections | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| By | Gauge | Int | ### redis.commands @@ -58,7 +58,7 @@ Total number of commands processed by the server | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {commands} | Sum | Int | Cumulative | true | ### redis.connections.received @@ -66,7 +66,7 @@ Total number of connections accepted by the server | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {connections} | Sum | Int | Cumulative | true | ### redis.connections.rejected @@ -74,7 +74,7 @@ Number of connections rejected because of maxclients limit | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {connections} | Sum | Int | Cumulative | true | ### redis.cpu.time @@ -110,7 +110,7 @@ Number of keyspace keys with an expiration | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| {keys} | Gauge | Int | #### Attributes @@ -124,7 +124,7 @@ Number of keyspace keys | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| {keys} | Gauge | Int | #### Attributes @@ -138,7 +138,7 @@ Number of evicted keys due to maxmemory limit | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {keys} | Sum | Int | Cumulative | true | ### redis.keys.expired @@ -146,7 +146,7 @@ Total number of key expiration events | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {events} | Sum | Int | Cumulative | true | ### redis.keyspace.hits @@ -154,7 +154,7 @@ Number of successful lookup of keys in the main dictionary | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {lookups} | Sum | Int | Cumulative | true | ### redis.keyspace.misses @@ -162,7 +162,7 @@ Number of failed lookup of keys in the main dictionary | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {lookups} | Sum | Int | Cumulative | true | ### redis.latest_fork @@ -178,7 +178,7 @@ Ratio between used_memory_rss and used_memory | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Double | +| {ratio} | Gauge | Double | ### redis.memory.lua @@ -234,7 +234,7 @@ Number of changes since the last dump | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {changes} | Sum | Int | Cumulative | false | ### redis.replication.backlog_first_byte_offset @@ -242,7 +242,7 @@ The master offset of the replication backlog buffer | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| By | Gauge | Int | ### redis.replication.offset @@ -250,7 +250,7 @@ The server's current replication offset | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Int | +| By | Gauge | Int | ### redis.slaves.connected @@ -258,7 +258,7 @@ Number of connected replicas | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {connections} | Sum | Int | Cumulative | false | ### redis.uptime @@ -284,7 +284,7 @@ Total number of calls for a command | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | true | +| {calls} | Sum | Int | Cumulative | true | #### Attributes @@ -320,7 +320,7 @@ Redis node's role | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| | Sum | Int | Cumulative | false | +| {role} | Sum | Int | Cumulative | false | #### Attributes diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics.go b/receiver/redisreceiver/internal/metadata/generated_metrics.go index e927948bc12c..e4e695848247 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics.go @@ -89,7 +89,7 @@ type metricRedisClientsBlocked struct { func (m *metricRedisClientsBlocked) init() { m.data.SetName("redis.clients.blocked") m.data.SetDescription("Number of clients pending on a blocking call") - m.data.SetUnit("") + m.data.SetUnit("{clients}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -140,7 +140,7 @@ type metricRedisClientsConnected struct { func (m *metricRedisClientsConnected) init() { m.data.SetName("redis.clients.connected") m.data.SetDescription("Number of client connections (excluding connections from replicas)") - m.data.SetUnit("") + m.data.SetUnit("{connections}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -191,7 +191,7 @@ type metricRedisClientsMaxInputBuffer struct { func (m *metricRedisClientsMaxInputBuffer) init() { m.data.SetName("redis.clients.max_input_buffer") m.data.SetDescription("Biggest input buffer among current client connections") - m.data.SetUnit("") + m.data.SetUnit("By") m.data.SetEmptyGauge() } @@ -240,7 +240,7 @@ type metricRedisClientsMaxOutputBuffer struct { func (m *metricRedisClientsMaxOutputBuffer) init() { m.data.SetName("redis.clients.max_output_buffer") m.data.SetDescription("Longest output list among current client connections") - m.data.SetUnit("") + m.data.SetUnit("By") m.data.SetEmptyGauge() } @@ -289,7 +289,7 @@ type metricRedisCmdCalls struct { func (m *metricRedisCmdCalls) init() { m.data.SetName("redis.cmd.calls") m.data.SetDescription("Total number of calls for a command") - m.data.SetUnit("") + m.data.SetUnit("{calls}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -444,7 +444,7 @@ type metricRedisCommandsProcessed struct { func (m *metricRedisCommandsProcessed) init() { m.data.SetName("redis.commands.processed") m.data.SetDescription("Total number of commands processed by the server") - m.data.SetUnit("") + m.data.SetUnit("{commands}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -495,7 +495,7 @@ type metricRedisConnectionsReceived struct { func (m *metricRedisConnectionsReceived) init() { m.data.SetName("redis.connections.received") m.data.SetDescription("Total number of connections accepted by the server") - m.data.SetUnit("") + m.data.SetUnit("{connections}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -546,7 +546,7 @@ type metricRedisConnectionsRejected struct { func (m *metricRedisConnectionsRejected) init() { m.data.SetName("redis.connections.rejected") m.data.SetDescription("Number of connections rejected because of maxclients limit") - m.data.SetUnit("") + m.data.SetUnit("{connections}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -701,7 +701,7 @@ type metricRedisDbExpires struct { func (m *metricRedisDbExpires) init() { m.data.SetName("redis.db.expires") m.data.SetDescription("Number of keyspace keys with an expiration") - m.data.SetUnit("") + m.data.SetUnit("{keys}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } @@ -752,7 +752,7 @@ type metricRedisDbKeys struct { func (m *metricRedisDbKeys) init() { m.data.SetName("redis.db.keys") m.data.SetDescription("Number of keyspace keys") - m.data.SetUnit("") + m.data.SetUnit("{keys}") m.data.SetEmptyGauge() m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) } @@ -803,7 +803,7 @@ type metricRedisKeysEvicted struct { func (m *metricRedisKeysEvicted) init() { m.data.SetName("redis.keys.evicted") m.data.SetDescription("Number of evicted keys due to maxmemory limit") - m.data.SetUnit("") + m.data.SetUnit("{keys}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -854,7 +854,7 @@ type metricRedisKeysExpired struct { func (m *metricRedisKeysExpired) init() { m.data.SetName("redis.keys.expired") m.data.SetDescription("Total number of key expiration events") - m.data.SetUnit("") + m.data.SetUnit("{events}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -905,7 +905,7 @@ type metricRedisKeyspaceHits struct { func (m *metricRedisKeyspaceHits) init() { m.data.SetName("redis.keyspace.hits") m.data.SetDescription("Number of successful lookup of keys in the main dictionary") - m.data.SetUnit("") + m.data.SetUnit("{lookups}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -956,7 +956,7 @@ type metricRedisKeyspaceMisses struct { func (m *metricRedisKeyspaceMisses) init() { m.data.SetName("redis.keyspace.misses") m.data.SetDescription("Number of failed lookup of keys in the main dictionary") - m.data.SetUnit("") + m.data.SetUnit("{lookups}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -1105,7 +1105,7 @@ type metricRedisMemoryFragmentationRatio struct { func (m *metricRedisMemoryFragmentationRatio) init() { m.data.SetName("redis.memory.fragmentation_ratio") m.data.SetDescription("Ratio between used_memory_rss and used_memory") - m.data.SetUnit("") + m.data.SetUnit("{ratio}") m.data.SetEmptyGauge() } @@ -1452,7 +1452,7 @@ type metricRedisRdbChangesSinceLastSave struct { func (m *metricRedisRdbChangesSinceLastSave) init() { m.data.SetName("redis.rdb.changes_since_last_save") m.data.SetDescription("Number of changes since the last dump") - m.data.SetUnit("") + m.data.SetUnit("{changes}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -1503,7 +1503,7 @@ type metricRedisReplicationBacklogFirstByteOffset struct { func (m *metricRedisReplicationBacklogFirstByteOffset) init() { m.data.SetName("redis.replication.backlog_first_byte_offset") m.data.SetDescription("The master offset of the replication backlog buffer") - m.data.SetUnit("") + m.data.SetUnit("By") m.data.SetEmptyGauge() } @@ -1552,7 +1552,7 @@ type metricRedisReplicationOffset struct { func (m *metricRedisReplicationOffset) init() { m.data.SetName("redis.replication.offset") m.data.SetDescription("The server's current replication offset") - m.data.SetUnit("") + m.data.SetUnit("By") m.data.SetEmptyGauge() } @@ -1601,7 +1601,7 @@ type metricRedisRole struct { func (m *metricRedisRole) init() { m.data.SetName("redis.role") m.data.SetDescription("Redis node's role") - m.data.SetUnit("") + m.data.SetUnit("{role}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -1654,7 +1654,7 @@ type metricRedisSlavesConnected struct { func (m *metricRedisSlavesConnected) init() { m.data.SetName("redis.slaves.connected") m.data.SetDescription("Number of connected replicas") - m.data.SetUnit("") + m.data.SetUnit("{connections}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go index 7e6a4e3b442f..913c4111186d 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go @@ -220,7 +220,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of clients pending on a blocking call", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{clients}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) @@ -234,7 +234,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of client connections (excluding connections from replicas)", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{connections}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) @@ -248,7 +248,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Biggest input buffer among current client connections", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "By", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -260,7 +260,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Longest output list among current client connections", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "By", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -272,7 +272,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Total number of calls for a command", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{calls}", 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) @@ -318,7 +318,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Total number of commands processed by the server", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{commands}", 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) @@ -332,7 +332,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Total number of connections accepted by the server", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{connections}", 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) @@ -346,7 +346,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of connections rejected because of maxclients limit", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{connections}", 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) @@ -392,7 +392,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Number of keyspace keys with an expiration", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{keys}", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -407,7 +407,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Number of keyspace keys", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{keys}", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -422,7 +422,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of evicted keys due to maxmemory limit", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{keys}", 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) @@ -436,7 +436,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Total number of key expiration events", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{events}", 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) @@ -450,7 +450,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of successful lookup of keys in the main dictionary", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{lookups}", 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) @@ -464,7 +464,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of failed lookup of keys in the main dictionary", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{lookups}", 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) @@ -502,7 +502,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Ratio between used_memory_rss and used_memory", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{ratio}", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -590,7 +590,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of changes since the last dump", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{changes}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) @@ -604,7 +604,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "The master offset of the replication backlog buffer", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "By", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -616,7 +616,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "The server's current replication offset", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "By", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -628,7 +628,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Redis node's role", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{role}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) @@ -645,7 +645,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of connected replicas", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "{connections}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index 8782bd78f06b..cb7ed6a41302 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -55,6 +55,7 @@ metrics: redis.role: enabled: false description: Redis node's role + unit: "{role}" sum: value_type: int monotonic: false @@ -64,7 +65,7 @@ metrics: redis.cmd.calls: enabled: false description: Total number of calls for a command - unit: "" + unit: "{calls}" sum: value_type: int monotonic: true @@ -103,7 +104,7 @@ metrics: redis.clients.connected: enabled: true description: Number of client connections (excluding connections from replicas) - unit: + unit: "{connections}" sum: value_type: int monotonic: false @@ -112,21 +113,21 @@ metrics: redis.clients.max_input_buffer: enabled: true description: Biggest input buffer among current client connections - unit: "" + unit: "By" gauge: value_type: int redis.clients.max_output_buffer: enabled: true description: Longest output list among current client connections - unit: "" + unit: "By" gauge: value_type: int redis.clients.blocked: enabled: true description: Number of clients pending on a blocking call - unit: "" + unit: "{clients}" sum: value_type: int monotonic: false @@ -135,7 +136,7 @@ metrics: redis.keys.expired: enabled: true description: Total number of key expiration events - unit: "" + unit: "{events}" sum: value_type: int monotonic: true @@ -145,7 +146,7 @@ metrics: redis.keys.evicted: enabled: true description: Number of evicted keys due to maxmemory limit - unit: "" + unit: "{keys}" sum: value_type: int monotonic: true @@ -154,7 +155,7 @@ metrics: redis.connections.received: enabled: true description: Total number of connections accepted by the server - unit: + unit: "{connections}" sum: value_type: int monotonic: true @@ -163,7 +164,7 @@ metrics: redis.connections.rejected: enabled: true description: Number of connections rejected because of maxclients limit - unit: + unit: "{connections}" sum: value_type: int monotonic: true @@ -200,14 +201,14 @@ metrics: redis.memory.fragmentation_ratio: enabled: true description: Ratio between used_memory_rss and used_memory - unit: "" + unit: "{ratio}" gauge: value_type: double redis.rdb.changes_since_last_save: enabled: true description: Number of changes since the last dump - unit: "" + unit: "{changes}" sum: value_type: int monotonic: false @@ -223,7 +224,7 @@ metrics: redis.commands.processed: enabled: true description: Total number of commands processed by the server - unit: "" + unit: "{commands}" sum: value_type: int monotonic: true @@ -250,7 +251,7 @@ metrics: redis.keyspace.hits: enabled: true description: Number of successful lookup of keys in the main dictionary - unit: "" + unit: "{lookups}" sum: value_type: int monotonic: true @@ -259,7 +260,7 @@ metrics: redis.keyspace.misses: enabled: true description: Number of failed lookup of keys in the main dictionary - unit: "" + unit: "{lookups}" sum: value_type: int monotonic: true @@ -275,7 +276,7 @@ metrics: redis.slaves.connected: enabled: true description: Number of connected replicas - unit: "" + unit: "{connections}" sum: value_type: int monotonic: false @@ -284,21 +285,21 @@ metrics: redis.replication.backlog_first_byte_offset: enabled: true description: The master offset of the replication backlog buffer - unit: "" + unit: "By" gauge: value_type: int redis.replication.offset: enabled: true description: The server's current replication offset - unit: "" + unit: "By" gauge: value_type: int redis.db.keys: enabled: true description: "Number of keyspace keys" - unit: "" + unit: "{keys}" gauge: value_type: int attributes: [db] @@ -306,7 +307,7 @@ metrics: redis.db.expires: enabled: true description: "Number of keyspace keys with an expiration" - unit: "" + unit: "{keys}" gauge: value_type: int attributes: [db] From 2e09f91872c7fd8183f3da89c4d5a7e70e958376 Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:21:52 +0200 Subject: [PATCH 02/12] Update receiver/redisreceiver/metadata.yaml Co-authored-by: Daniel Jaglowski --- receiver/redisreceiver/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index cb7ed6a41302..4ddb728d3049 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -104,7 +104,7 @@ metrics: redis.clients.connected: enabled: true description: Number of client connections (excluding connections from replicas) - unit: "{connections}" + unit: "{clients}" sum: value_type: int monotonic: false From 2ff3137569524c7086c38aa77001f7812db217f7 Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:22:02 +0200 Subject: [PATCH 03/12] Update receiver/redisreceiver/metadata.yaml Co-authored-by: Daniel Jaglowski --- receiver/redisreceiver/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index 4ddb728d3049..42243cf1a513 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -251,7 +251,7 @@ metrics: redis.keyspace.hits: enabled: true description: Number of successful lookup of keys in the main dictionary - unit: "{lookups}" + unit: "{hits}" sum: value_type: int monotonic: true From 2687cf8b22e7245def20ee839a78487feb09f06e Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:22:18 +0200 Subject: [PATCH 04/12] Update receiver/redisreceiver/metadata.yaml Co-authored-by: Daniel Jaglowski --- receiver/redisreceiver/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index 42243cf1a513..e8d1332b9d57 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -260,7 +260,7 @@ metrics: redis.keyspace.misses: enabled: true description: Number of failed lookup of keys in the main dictionary - unit: "{lookups}" + unit: "{misses}" sum: value_type: int monotonic: true From dc5836a224fc818c63bafbab24dfc39e03c91316 Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:22:27 +0200 Subject: [PATCH 05/12] Update receiver/redisreceiver/metadata.yaml Co-authored-by: Daniel Jaglowski --- receiver/redisreceiver/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index e8d1332b9d57..fb3b0995b724 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -276,7 +276,7 @@ metrics: redis.slaves.connected: enabled: true description: Number of connected replicas - unit: "{connections}" + unit: "{replicas}" sum: value_type: int monotonic: false From d1f60341312e34d95b41dc67a7776c933ce4ff28 Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 17:26:58 +0200 Subject: [PATCH 06/12] Remove By and run make generate --- receiver/redisreceiver/documentation.md | 16 ++++++++-------- .../internal/metadata/generated_metrics.go | 16 ++++++++-------- .../internal/metadata/generated_metrics_test.go | 16 ++++++++-------- receiver/redisreceiver/metadata.yaml | 8 ++++---- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/receiver/redisreceiver/documentation.md b/receiver/redisreceiver/documentation.md index ebac1f469dae..3af8e18f531f 100644 --- a/receiver/redisreceiver/documentation.md +++ b/receiver/redisreceiver/documentation.md @@ -26,7 +26,7 @@ Number of client connections (excluding connections from replicas) | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| {connections} | Sum | Int | Cumulative | false | +| {clients} | Sum | Int | Cumulative | false | ### redis.clients.max_input_buffer @@ -34,7 +34,7 @@ Biggest input buffer among current client connections | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| By | Gauge | Int | +| | Gauge | Int | ### redis.clients.max_output_buffer @@ -42,7 +42,7 @@ Longest output list among current client connections | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| By | Gauge | Int | +| | Gauge | Int | ### redis.commands @@ -154,7 +154,7 @@ Number of successful lookup of keys in the main dictionary | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| {lookups} | Sum | Int | Cumulative | true | +| {hits} | Sum | Int | Cumulative | true | ### redis.keyspace.misses @@ -162,7 +162,7 @@ Number of failed lookup of keys in the main dictionary | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| {lookups} | Sum | Int | Cumulative | true | +| {misses} | Sum | Int | Cumulative | true | ### redis.latest_fork @@ -242,7 +242,7 @@ The master offset of the replication backlog buffer | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| By | Gauge | Int | +| | Gauge | Int | ### redis.replication.offset @@ -250,7 +250,7 @@ The server's current replication offset | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| By | Gauge | Int | +| | Gauge | Int | ### redis.slaves.connected @@ -258,7 +258,7 @@ Number of connected replicas | Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ---- | ----------- | ---------- | ----------------------- | --------- | -| {connections} | Sum | Int | Cumulative | false | +| {replicas} | Sum | Int | Cumulative | false | ### redis.uptime diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics.go b/receiver/redisreceiver/internal/metadata/generated_metrics.go index e4e695848247..3996114252aa 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics.go @@ -140,7 +140,7 @@ type metricRedisClientsConnected struct { func (m *metricRedisClientsConnected) init() { m.data.SetName("redis.clients.connected") m.data.SetDescription("Number of client connections (excluding connections from replicas)") - m.data.SetUnit("{connections}") + m.data.SetUnit("{clients}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -191,7 +191,7 @@ type metricRedisClientsMaxInputBuffer struct { func (m *metricRedisClientsMaxInputBuffer) init() { m.data.SetName("redis.clients.max_input_buffer") m.data.SetDescription("Biggest input buffer among current client connections") - m.data.SetUnit("By") + m.data.SetUnit("") m.data.SetEmptyGauge() } @@ -240,7 +240,7 @@ type metricRedisClientsMaxOutputBuffer struct { func (m *metricRedisClientsMaxOutputBuffer) init() { m.data.SetName("redis.clients.max_output_buffer") m.data.SetDescription("Longest output list among current client connections") - m.data.SetUnit("By") + m.data.SetUnit("") m.data.SetEmptyGauge() } @@ -905,7 +905,7 @@ type metricRedisKeyspaceHits struct { func (m *metricRedisKeyspaceHits) init() { m.data.SetName("redis.keyspace.hits") m.data.SetDescription("Number of successful lookup of keys in the main dictionary") - m.data.SetUnit("{lookups}") + m.data.SetUnit("{hits}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -956,7 +956,7 @@ type metricRedisKeyspaceMisses struct { func (m *metricRedisKeyspaceMisses) init() { m.data.SetName("redis.keyspace.misses") m.data.SetDescription("Number of failed lookup of keys in the main dictionary") - m.data.SetUnit("{lookups}") + m.data.SetUnit("{misses}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) @@ -1503,7 +1503,7 @@ type metricRedisReplicationBacklogFirstByteOffset struct { func (m *metricRedisReplicationBacklogFirstByteOffset) init() { m.data.SetName("redis.replication.backlog_first_byte_offset") m.data.SetDescription("The master offset of the replication backlog buffer") - m.data.SetUnit("By") + m.data.SetUnit("") m.data.SetEmptyGauge() } @@ -1552,7 +1552,7 @@ type metricRedisReplicationOffset struct { func (m *metricRedisReplicationOffset) init() { m.data.SetName("redis.replication.offset") m.data.SetDescription("The server's current replication offset") - m.data.SetUnit("By") + m.data.SetUnit("") m.data.SetEmptyGauge() } @@ -1654,7 +1654,7 @@ type metricRedisSlavesConnected struct { func (m *metricRedisSlavesConnected) init() { m.data.SetName("redis.slaves.connected") m.data.SetDescription("Number of connected replicas") - m.data.SetUnit("{connections}") + m.data.SetUnit("{replicas}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(false) m.data.Sum().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go index 913c4111186d..296cd0da0954 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go @@ -234,7 +234,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of client connections (excluding connections from replicas)", ms.At(i).Description()) - assert.Equal(t, "{connections}", ms.At(i).Unit()) + assert.Equal(t, "{clients}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) @@ -248,7 +248,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Biggest input buffer among current client connections", ms.At(i).Description()) - assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, "", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -260,7 +260,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Longest output list among current client connections", ms.At(i).Description()) - assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, "", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -450,7 +450,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of successful lookup of keys in the main dictionary", ms.At(i).Description()) - assert.Equal(t, "{lookups}", ms.At(i).Unit()) + assert.Equal(t, "{hits}", 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) @@ -464,7 +464,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of failed lookup of keys in the main dictionary", ms.At(i).Description()) - assert.Equal(t, "{lookups}", ms.At(i).Unit()) + assert.Equal(t, "{misses}", 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) @@ -604,7 +604,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "The master offset of the replication backlog buffer", ms.At(i).Description()) - assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, "", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -616,7 +616,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "The server's current replication offset", ms.At(i).Description()) - assert.Equal(t, "By", ms.At(i).Unit()) + assert.Equal(t, "", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) @@ -645,7 +645,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len()) assert.Equal(t, "Number of connected replicas", ms.At(i).Description()) - assert.Equal(t, "{connections}", ms.At(i).Unit()) + assert.Equal(t, "{replicas}", ms.At(i).Unit()) assert.Equal(t, false, ms.At(i).Sum().IsMonotonic()) assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality()) dp := ms.At(i).Sum().DataPoints().At(0) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index fb3b0995b724..45d3e2da5221 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -113,14 +113,14 @@ metrics: redis.clients.max_input_buffer: enabled: true description: Biggest input buffer among current client connections - unit: "By" + unit: "" gauge: value_type: int redis.clients.max_output_buffer: enabled: true description: Longest output list among current client connections - unit: "By" + unit: "" gauge: value_type: int @@ -285,14 +285,14 @@ metrics: redis.replication.backlog_first_byte_offset: enabled: true description: The master offset of the replication backlog buffer - unit: "By" + unit: "" gauge: value_type: int redis.replication.offset: enabled: true description: The server's current replication offset - unit: "By" + unit: "" gauge: value_type: int From 14158488f43195b9da1063e25b49622a5b6fc6cd Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 17:51:06 +0200 Subject: [PATCH 07/12] remove ratio --- receiver/redisreceiver/documentation.md | 2 +- receiver/redisreceiver/internal/metadata/generated_metrics.go | 2 +- .../redisreceiver/internal/metadata/generated_metrics_test.go | 2 +- receiver/redisreceiver/metadata.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/receiver/redisreceiver/documentation.md b/receiver/redisreceiver/documentation.md index 3af8e18f531f..56f9e0013851 100644 --- a/receiver/redisreceiver/documentation.md +++ b/receiver/redisreceiver/documentation.md @@ -178,7 +178,7 @@ Ratio between used_memory_rss and used_memory | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| {ratio} | Gauge | Double | +| | Gauge | Double | ### redis.memory.lua diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics.go b/receiver/redisreceiver/internal/metadata/generated_metrics.go index 3996114252aa..e3a6e60f1b18 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics.go @@ -1105,7 +1105,7 @@ type metricRedisMemoryFragmentationRatio struct { func (m *metricRedisMemoryFragmentationRatio) init() { m.data.SetName("redis.memory.fragmentation_ratio") m.data.SetDescription("Ratio between used_memory_rss and used_memory") - m.data.SetUnit("{ratio}") + m.data.SetUnit("") m.data.SetEmptyGauge() } diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go index 296cd0da0954..53567944051a 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go @@ -502,7 +502,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Ratio between used_memory_rss and used_memory", ms.At(i).Description()) - assert.Equal(t, "{ratio}", ms.At(i).Unit()) + assert.Equal(t, "", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index 45d3e2da5221..bf61aa800fa7 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -201,7 +201,7 @@ metrics: redis.memory.fragmentation_ratio: enabled: true description: Ratio between used_memory_rss and used_memory - unit: "{ratio}" + unit: "" gauge: value_type: double From 85bd0af7c35039dcf5b239313409c6b04f916b9c Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 20:20:29 +0200 Subject: [PATCH 08/12] run golden.WriteMetrics --- .../testdata/scraper/otel/expected.yaml | 237 +++++++++--------- 1 file changed, 120 insertions(+), 117 deletions(-) diff --git a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml index fd6e123801b7..aaa8f51842a3 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml @@ -1,5 +1,6 @@ resourceMetrics: - - resource: {} + - resource: + attributes: [] scopeMetrics: - metrics: - description: Number of buffers allocated. @@ -8,8 +9,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{buffers}' - description: Number of buffers written. @@ -22,29 +23,29 @@ resourceMetrics: - key: source value: stringValue: backend - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "8" attributes: - key: source value: stringValue: backend_fsync - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "5" attributes: - key: source value: stringValue: bgwriter - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "9" attributes: - key: source value: stringValue: checkpoints - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{buffers}' - description: The number of checkpoints performed. @@ -57,15 +58,15 @@ resourceMetrics: - key: type value: stringValue: requested - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "2" attributes: - key: type value: stringValue: scheduled - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{checkpoints}' - description: Total time spent writing and syncing files to disk by checkpoints. @@ -78,15 +79,15 @@ resourceMetrics: - key: type value: stringValue: sync - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asDouble: 3.12 attributes: - key: type value: stringValue: write - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: ms - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. @@ -95,15 +96,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "11" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true + unit: '{stoppages}' - description: Configured maximum number of client connections allowed gauge: dataPoints: - asInt: "100" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.connection.max unit: '{connections}' - description: Number of user databases. @@ -112,8 +114,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: '{databases}' - description: The amount of data delayed in replication. gauge: @@ -123,16 +125,16 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.replication.data_delay unit: By - description: Age of the oldest WAL file. gauge: dataPoints: - asInt: "3600" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.wal.age unit: s - description: Time between flushing recent WAL locally and receiving notification that the standby server has completed an operation with it. @@ -146,8 +148,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "700" attributes: - key: operation @@ -156,8 +158,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "800" attributes: - key: operation @@ -166,8 +168,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.wal.lag unit: s scope: @@ -186,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -195,8 +197,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -205,8 +207,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -214,8 +216,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -224,8 +226,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -249,57 +252,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "19" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "22" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "21" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "26" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "25" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "23" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -312,29 +315,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "42" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "39" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "40" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -347,15 +350,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "7" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -363,8 +366,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -372,8 +375,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{vacuums}' scope: @@ -399,57 +402,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "27" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "30" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "29" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "34" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "33" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "31" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -462,29 +465,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "46" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "43" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "44" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -497,15 +500,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -513,8 +516,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "47" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -522,8 +525,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{vacuums}' scope: @@ -548,16 +551,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "35" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "36" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.index.size unit: By scope: @@ -582,16 +585,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1684786281201767000" - timeUnixNano: "1684786281201820000" + startTimeUnixNano: "1687198526863275000" + timeUnixNano: "1687198526863376000" name: postgresql.index.size unit: By scope: From 2c1d7418b213c1cb7b13a39fb909e84504361047 Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 20:27:33 +0200 Subject: [PATCH 09/12] add default unit 1 --- receiver/redisreceiver/documentation.md | 2 +- receiver/redisreceiver/internal/metadata/generated_metrics.go | 2 +- .../redisreceiver/internal/metadata/generated_metrics_test.go | 2 +- receiver/redisreceiver/metadata.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/receiver/redisreceiver/documentation.md b/receiver/redisreceiver/documentation.md index 56f9e0013851..f9ce85448cf1 100644 --- a/receiver/redisreceiver/documentation.md +++ b/receiver/redisreceiver/documentation.md @@ -178,7 +178,7 @@ Ratio between used_memory_rss and used_memory | Unit | Metric Type | Value Type | | ---- | ----------- | ---------- | -| | Gauge | Double | +| 1 | Gauge | Double | ### redis.memory.lua diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics.go b/receiver/redisreceiver/internal/metadata/generated_metrics.go index e3a6e60f1b18..ca11906d95b8 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics.go @@ -1105,7 +1105,7 @@ type metricRedisMemoryFragmentationRatio struct { func (m *metricRedisMemoryFragmentationRatio) init() { m.data.SetName("redis.memory.fragmentation_ratio") m.data.SetDescription("Ratio between used_memory_rss and used_memory") - m.data.SetUnit("") + m.data.SetUnit("1") m.data.SetEmptyGauge() } diff --git a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go index 53567944051a..ffa4710869e5 100644 --- a/receiver/redisreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/redisreceiver/internal/metadata/generated_metrics_test.go @@ -502,7 +502,7 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type()) assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len()) assert.Equal(t, "Ratio between used_memory_rss and used_memory", ms.At(i).Description()) - assert.Equal(t, "", ms.At(i).Unit()) + assert.Equal(t, "1", ms.At(i).Unit()) dp := ms.At(i).Gauge().DataPoints().At(0) assert.Equal(t, start, dp.StartTimestamp()) assert.Equal(t, ts, dp.Timestamp()) diff --git a/receiver/redisreceiver/metadata.yaml b/receiver/redisreceiver/metadata.yaml index bf61aa800fa7..60add0e5d66f 100644 --- a/receiver/redisreceiver/metadata.yaml +++ b/receiver/redisreceiver/metadata.yaml @@ -201,7 +201,7 @@ metrics: redis.memory.fragmentation_ratio: enabled: true description: Ratio between used_memory_rss and used_memory - unit: "" + unit: 1 gauge: value_type: double From f4249b8b065f262024c7d3b6c295f64a78744c9a Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 20:46:29 +0200 Subject: [PATCH 10/12] golden.ReadMetrics for all tests --- receiver/postgresqlreceiver/scraper_test.go | 5 + .../testdata/scraper/multiple/expected.yaml | 567 +++++++++--------- .../multiple/expected_with_resource.yaml | 567 +++++++++--------- .../testdata/scraper/otel/expected.yaml | 232 +++---- .../scraper/otel/expected_with_resource.yaml | 237 ++++---- 5 files changed, 813 insertions(+), 795 deletions(-) diff --git a/receiver/postgresqlreceiver/scraper_test.go b/receiver/postgresqlreceiver/scraper_test.go index f04e029f9b60..d9bf9add2662 100644 --- a/receiver/postgresqlreceiver/scraper_test.go +++ b/receiver/postgresqlreceiver/scraper_test.go @@ -43,6 +43,7 @@ func TestScraper(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected.yaml") + golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -61,6 +62,7 @@ func TestScraperNoDatabaseSingle(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected.yaml") + golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -79,6 +81,7 @@ func TestScraperNoDatabaseMultiple(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "multiple", "expected.yaml") + golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -97,6 +100,7 @@ func TestScraperWithResourceAttributeFeatureGate(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "multiple", "expected_with_resource.yaml") + golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -115,6 +119,7 @@ func TestScraperWithResourceAttributeFeatureGateSingle(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected_with_resource.yaml") + golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) diff --git a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml index 66ac42ca7059..7898809a9eec 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected.yaml @@ -1,5 +1,6 @@ resourceMetrics: - - resource: {} + - resource: + attributes: [] scopeMetrics: - metrics: - description: Number of buffers allocated. @@ -8,8 +9,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{buffers}' - description: Number of buffers written. @@ -22,29 +23,29 @@ resourceMetrics: - key: source value: stringValue: backend - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "8" attributes: - key: source value: stringValue: backend_fsync - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "5" attributes: - key: source value: stringValue: bgwriter - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "9" attributes: - key: source value: stringValue: checkpoints - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{buffers}' - description: The number of checkpoints performed. @@ -57,15 +58,15 @@ resourceMetrics: - key: type value: stringValue: requested - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "2" attributes: - key: type value: stringValue: scheduled - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{checkpoints}' - description: Total time spent writing and syncing files to disk by checkpoints. @@ -78,15 +79,15 @@ resourceMetrics: - key: type value: stringValue: sync - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asDouble: 3.12 attributes: - key: type value: stringValue: write - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: ms - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. @@ -95,15 +96,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "11" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true + unit: '{stoppages}' - description: Configured maximum number of client connections allowed gauge: dataPoints: - asInt: "100" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.connection.max unit: '{connections}' - description: Number of user databases. @@ -112,8 +114,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: '{databases}' - description: The amount of data delayed in replication. gauge: @@ -123,16 +125,16 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.replication.data_delay unit: By - description: Age of the oldest WAL file. gauge: dataPoints: - asInt: "3600" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.wal.age unit: s - description: Time between flushing recent WAL locally and receiving notification that the standby server has completed an operation with it. @@ -146,8 +148,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "700" attributes: - key: operation @@ -156,8 +158,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "800" attributes: - key: operation @@ -166,8 +168,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.wal.lag unit: s scope: @@ -186,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -195,8 +197,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -205,8 +207,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -214,8 +216,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -224,8 +226,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -242,8 +245,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -251,8 +254,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -261,8 +264,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -270,8 +273,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -280,8 +283,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -298,8 +302,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -307,8 +311,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -317,8 +321,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "6" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -326,8 +330,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -336,8 +340,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -361,57 +366,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "20" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "23" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "22" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "27" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "26" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "25" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -424,29 +429,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "43" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "40" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "41" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -459,15 +464,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "8" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -475,8 +480,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -484,8 +489,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "45" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -511,57 +516,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "28" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "31" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "30" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "35" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "34" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "33" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -574,29 +579,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "47" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "44" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "45" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -609,15 +614,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "10" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -625,8 +630,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -634,8 +639,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "49" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -661,57 +666,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "19" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "22" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "21" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "26" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "25" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "23" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -724,29 +729,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "42" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "39" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "40" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -759,15 +764,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "7" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -775,8 +780,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -784,8 +789,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -811,57 +816,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "27" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "30" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "29" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "34" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "33" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "31" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -874,29 +879,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "46" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "43" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "44" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -909,15 +914,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -925,8 +930,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "47" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -934,8 +939,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -961,57 +966,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "21" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "24" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "23" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "28" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "27" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "26" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "25" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -1024,29 +1029,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "44" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "41" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "42" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -1059,15 +1064,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -1075,8 +1080,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "45" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -1084,8 +1089,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "46" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -1111,57 +1116,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "29" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "32" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "31" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "36" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "35" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "34" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "33" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -1174,29 +1179,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "48" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "45" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "46" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -1209,15 +1214,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" - asInt: "11" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -1225,8 +1230,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "49" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -1234,8 +1239,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "50" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{vacuums}' scope: @@ -1260,16 +1265,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "36" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "37" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: @@ -1294,16 +1299,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "38" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "39" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: @@ -1328,16 +1333,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "35" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "36" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: @@ -1362,16 +1367,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: @@ -1396,16 +1401,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: @@ -1430,16 +1435,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "39" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "40" - startTimeUnixNano: "1684786281207476000" - timeUnixNano: "1684786281207521000" + startTimeUnixNano: "1687200313685486000" + timeUnixNano: "1687200313685658000" name: postgresql.index.size unit: By scope: diff --git a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected_with_resource.yaml b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected_with_resource.yaml index 195d50fca9a2..a8fa3a80deb0 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/multiple/expected_with_resource.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/multiple/expected_with_resource.yaml @@ -1,5 +1,6 @@ resourceMetrics: - - resource: {} + - resource: + attributes: [] scopeMetrics: - metrics: - description: Number of buffers allocated. @@ -8,8 +9,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{buffers}' - description: Number of buffers written. @@ -22,29 +23,29 @@ resourceMetrics: - key: source value: stringValue: backend - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "8" attributes: - key: source value: stringValue: backend_fsync - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "5" attributes: - key: source value: stringValue: bgwriter - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "9" attributes: - key: source value: stringValue: checkpoints - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{buffers}' - description: The number of checkpoints performed. @@ -57,15 +58,15 @@ resourceMetrics: - key: type value: stringValue: requested - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "2" attributes: - key: type value: stringValue: scheduled - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{checkpoints}' - description: Total time spent writing and syncing files to disk by checkpoints. @@ -78,15 +79,15 @@ resourceMetrics: - key: type value: stringValue: sync - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asDouble: 3.12 attributes: - key: type value: stringValue: write - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: ms - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. @@ -95,15 +96,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "11" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true + unit: '{stoppages}' - description: Configured maximum number of client connections allowed gauge: dataPoints: - asInt: "100" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.connection.max unit: '{connections}' - description: Number of user databases. @@ -112,8 +114,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: '{databases}' - description: The amount of data delayed in replication. gauge: @@ -123,16 +125,16 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.replication.data_delay unit: By - description: Age of the oldest WAL file. gauge: dataPoints: - asInt: "3600" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.wal.age unit: s - description: Time between flushing recent WAL locally and receiving notification that the standby server has completed an operation with it. @@ -146,8 +148,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "700" attributes: - key: operation @@ -156,8 +158,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "800" attributes: - key: operation @@ -166,8 +168,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.wal.lag unit: s scope: @@ -186,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -195,8 +197,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -205,8 +207,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -214,8 +216,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -224,8 +226,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -242,8 +245,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -251,8 +254,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -261,8 +264,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -270,8 +273,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -280,8 +283,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -298,8 +302,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "5" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -307,8 +311,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -317,8 +321,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "6" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -326,8 +330,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -336,8 +340,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -361,57 +366,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "20" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "23" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "22" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "27" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "26" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "25" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -424,29 +429,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "43" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "40" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "41" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -459,15 +464,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "8" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -475,8 +480,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -484,8 +489,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "45" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -511,57 +516,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "28" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "31" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "30" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "35" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "34" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "33" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -574,29 +579,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "47" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "44" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "45" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -609,15 +614,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "10" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -625,8 +630,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -634,8 +639,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "49" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -661,57 +666,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "19" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "22" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "21" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "26" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "25" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "23" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -724,29 +729,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "42" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "39" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "40" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -759,15 +764,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "7" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -775,8 +780,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -784,8 +789,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -811,57 +816,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "27" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "30" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "29" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "34" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "33" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "31" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -874,29 +879,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "46" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "43" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "44" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -909,15 +914,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -925,8 +930,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "47" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -934,8 +939,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -961,57 +966,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "21" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "24" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "23" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "28" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "27" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "26" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "25" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -1024,29 +1029,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "44" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "41" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "42" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -1059,15 +1064,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -1075,8 +1080,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "45" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -1084,8 +1089,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "46" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -1111,57 +1116,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "29" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "32" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "31" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "36" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "35" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "34" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "33" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -1174,29 +1179,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "48" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "45" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "46" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -1209,15 +1214,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" - asInt: "11" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -1225,8 +1230,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "49" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -1234,8 +1239,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "50" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{vacuums}' scope: @@ -1260,16 +1265,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "36" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "37" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: @@ -1294,16 +1299,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "38" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "39" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: @@ -1328,16 +1333,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "35" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "36" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: @@ -1362,16 +1367,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: @@ -1396,16 +1401,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: @@ -1430,16 +1435,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "39" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "40" - startTimeUnixNano: "1660755376404913000" - timeUnixNano: "1660755376405089000" + startTimeUnixNano: "1687200316061936000" + timeUnixNano: "1687200316062100000" name: postgresql.index.size unit: By scope: diff --git a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml index aaa8f51842a3..aaabca5f1efb 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/otel/expected.yaml @@ -9,8 +9,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{buffers}' - description: Number of buffers written. @@ -23,29 +23,29 @@ resourceMetrics: - key: source value: stringValue: backend - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "8" attributes: - key: source value: stringValue: backend_fsync - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "5" attributes: - key: source value: stringValue: bgwriter - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "9" attributes: - key: source value: stringValue: checkpoints - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{buffers}' - description: The number of checkpoints performed. @@ -58,15 +58,15 @@ resourceMetrics: - key: type value: stringValue: requested - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "2" attributes: - key: type value: stringValue: scheduled - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{checkpoints}' - description: Total time spent writing and syncing files to disk by checkpoints. @@ -79,15 +79,15 @@ resourceMetrics: - key: type value: stringValue: sync - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asDouble: 3.12 attributes: - key: type value: stringValue: write - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: ms - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. @@ -96,16 +96,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "11" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{stoppages}' - description: Configured maximum number of client connections allowed gauge: dataPoints: - asInt: "100" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.connection.max unit: '{connections}' - description: Number of user databases. @@ -114,8 +114,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: '{databases}' - description: The amount of data delayed in replication. gauge: @@ -125,16 +125,16 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.replication.data_delay unit: By - description: Age of the oldest WAL file. gauge: dataPoints: - asInt: "3600" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.wal.age unit: s - description: Time between flushing recent WAL locally and receiving notification that the standby server has completed an operation with it. @@ -148,8 +148,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "700" attributes: - key: operation @@ -158,8 +158,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "800" attributes: - key: operation @@ -168,8 +168,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.wal.lag unit: s scope: @@ -188,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -197,8 +197,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -207,8 +207,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -216,8 +216,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -226,8 +226,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: '{tables}' scope: name: otelcol/postgresqlreceiver @@ -252,57 +252,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "19" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "22" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "21" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "26" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "25" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "23" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -315,29 +315,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "42" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "39" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "40" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -350,15 +350,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "7" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -366,8 +366,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -375,8 +375,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{vacuums}' scope: @@ -402,57 +402,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "27" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "30" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "29" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "34" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "33" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "31" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -465,29 +465,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "46" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "43" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "44" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -500,15 +500,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -516,8 +516,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "47" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -525,8 +525,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{vacuums}' scope: @@ -551,16 +551,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "35" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "36" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.index.size unit: By scope: @@ -585,16 +585,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1687198526863275000" - timeUnixNano: "1687198526863376000" + startTimeUnixNano: "1687200310952658000" + timeUnixNano: "1687200310952822000" name: postgresql.index.size unit: By scope: diff --git a/receiver/postgresqlreceiver/testdata/scraper/otel/expected_with_resource.yaml b/receiver/postgresqlreceiver/testdata/scraper/otel/expected_with_resource.yaml index 5457e8beeb56..185c9e1bce1d 100644 --- a/receiver/postgresqlreceiver/testdata/scraper/otel/expected_with_resource.yaml +++ b/receiver/postgresqlreceiver/testdata/scraper/otel/expected_with_resource.yaml @@ -1,5 +1,6 @@ resourceMetrics: - - resource: {} + - resource: + attributes: [] scopeMetrics: - metrics: - description: Number of buffers allocated. @@ -8,8 +9,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "10" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{buffers}' - description: Number of buffers written. @@ -22,29 +23,29 @@ resourceMetrics: - key: source value: stringValue: backend - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "8" attributes: - key: source value: stringValue: backend_fsync - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "5" attributes: - key: source value: stringValue: bgwriter - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "9" attributes: - key: source value: stringValue: checkpoints - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{buffers}' - description: The number of checkpoints performed. @@ -57,15 +58,15 @@ resourceMetrics: - key: type value: stringValue: requested - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "2" attributes: - key: type value: stringValue: scheduled - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{checkpoints}' - description: Total time spent writing and syncing files to disk by checkpoints. @@ -78,15 +79,15 @@ resourceMetrics: - key: type value: stringValue: sync - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asDouble: 3.12 attributes: - key: type value: stringValue: write - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: ms - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. @@ -95,15 +96,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "11" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true + unit: '{stoppages}' - description: Configured maximum number of client connections allowed gauge: dataPoints: - asInt: "100" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.connection.max unit: '{connections}' - description: Number of user databases. @@ -112,8 +114,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: '{databases}' - description: The amount of data delayed in replication. gauge: @@ -123,16 +125,16 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.replication.data_delay unit: By - description: Age of the oldest WAL file. gauge: dataPoints: - asInt: "3600" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.wal.age unit: s - description: Time between flushing recent WAL locally and receiving notification that the standby server has completed an operation with it. @@ -146,8 +148,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "700" attributes: - key: operation @@ -156,8 +158,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "800" attributes: - key: operation @@ -166,8 +168,8 @@ resourceMetrics: - key: replication_client value: stringValue: unix - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.wal.lag unit: s scope: @@ -186,8 +188,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: "1" - description: The number of commits. name: postgresql.commits @@ -195,8 +197,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -205,8 +207,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks @@ -214,8 +216,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -224,8 +226,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -249,57 +252,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "19" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "22" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "21" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "26" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "25" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "24" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "23" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -312,29 +315,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "42" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "39" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "40" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -347,15 +350,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "7" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -363,8 +366,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "43" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -372,8 +375,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "44" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{vacuums}' scope: @@ -399,57 +402,57 @@ resourceMetrics: - key: source value: stringValue: heap_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "27" attributes: - key: source value: stringValue: heap_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "30" attributes: - key: source value: stringValue: idx_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "29" attributes: - key: source value: stringValue: idx_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "34" attributes: - key: source value: stringValue: tidx_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "33" attributes: - key: source value: stringValue: tidx_read - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "32" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "31" attributes: - key: source value: stringValue: toast_hit - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -462,29 +465,29 @@ resourceMetrics: - key: operation value: stringValue: del - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "46" attributes: - key: operation value: stringValue: hot_upd - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "43" attributes: - key: operation value: stringValue: ins - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "44" attributes: - key: operation value: stringValue: upd - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -497,15 +500,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" - asInt: "9" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -513,8 +516,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "47" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -522,8 +525,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "48" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{vacuums}' scope: @@ -548,16 +551,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "35" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "36" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.index.size unit: By scope: @@ -582,16 +585,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "37" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "38" - startTimeUnixNano: "1660755387092164000" - timeUnixNano: "1660755387092521000" + startTimeUnixNano: "1687200320184856000" + timeUnixNano: "1687200320184958000" name: postgresql.index.size unit: By scope: From fca368741e6eaf03667e5998e916d52cc4b91b7f Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 20:58:21 +0200 Subject: [PATCH 11/12] remove calls to golden.WriteMetrics --- receiver/postgresqlreceiver/scraper_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/receiver/postgresqlreceiver/scraper_test.go b/receiver/postgresqlreceiver/scraper_test.go index d9bf9add2662..f04e029f9b60 100644 --- a/receiver/postgresqlreceiver/scraper_test.go +++ b/receiver/postgresqlreceiver/scraper_test.go @@ -43,7 +43,6 @@ func TestScraper(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected.yaml") - golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -62,7 +61,6 @@ func TestScraperNoDatabaseSingle(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected.yaml") - golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -81,7 +79,6 @@ func TestScraperNoDatabaseMultiple(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "multiple", "expected.yaml") - golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -100,7 +97,6 @@ func TestScraperWithResourceAttributeFeatureGate(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "multiple", "expected_with_resource.yaml") - golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) @@ -119,7 +115,6 @@ func TestScraperWithResourceAttributeFeatureGateSingle(t *testing.T) { require.NoError(t, err) expectedFile := filepath.Join("testdata", "scraper", "otel", "expected_with_resource.yaml") - golden.WriteMetrics(t, expectedFile, actualMetrics) expectedMetrics, err := golden.ReadMetrics(expectedFile) require.NoError(t, err) From 4e9e9d9bd8c8d9af67dafdbb806c6cfd8acf62df Mon Sep 17 00:00:00 2001 From: mackjmr Date: Mon, 19 Jun 2023 21:52:47 +0200 Subject: [PATCH 12/12] run golden.WriteMetrics for all 3 receivers --- .../testdata/integration/expected.yaml | 630 ++++++------ .../testdata/integration/expected_all_db.yaml | 973 +++++++++--------- .../integration/expected_multi_db.yaml | 954 ++++++++--------- .../integration/expected_single_db.yaml | 541 +++++----- .../testdata/integration/expected.yaml | 146 +-- 5 files changed, 1634 insertions(+), 1610 deletions(-) diff --git a/receiver/aerospikereceiver/testdata/integration/expected.yaml b/receiver/aerospikereceiver/testdata/integration/expected.yaml index cb04f98a4d00..92b0f374ef76 100644 --- a/receiver/aerospikereceiver/testdata/integration/expected.yaml +++ b/receiver/aerospikereceiver/testdata/integration/expected.yaml @@ -3,7 +3,7 @@ resourceMetrics: attributes: - key: aerospike.node.name value: - stringValue: BB9040011AC4202 + stringValue: BB9030011AC4202 scopeMetrics: - metrics: - description: Number of connections opened and closed to the node @@ -11,66 +11,66 @@ resourceMetrics: sum: aggregationTemporality: 2 dataPoints: - - asInt: "0" + - asInt: "320" attributes: - - key: type - value: - stringValue: fabric - key: operation value: - stringValue: open - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "2" - attributes: + stringValue: close - key: type value: stringValue: client + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: operation value: stringValue: close - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + - key: type + value: + stringValue: fabric + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: operation + value: + stringValue: close - key: type value: stringValue: heartbeat + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "371" + attributes: - key: operation value: stringValue: open - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: - stringValue: heartbeat - - key: operation - value: - stringValue: close - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: client + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - - key: type - value: - stringValue: fabric - key: operation value: - stringValue: close - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "53" - attributes: + stringValue: open - key: type value: - stringValue: client + stringValue: fabric + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: operation value: stringValue: open - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + - key: type + value: + stringValue: heartbeat + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{connections}' - description: Current number of open connections to the node @@ -78,34 +78,34 @@ resourceMetrics: sum: aggregationTemporality: 2 dataPoints: - - asInt: "0" - attributes: - - key: type - value: - stringValue: heartbeat - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - asInt: "51" attributes: - key: type value: stringValue: client - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - key: type value: stringValue: fabric - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: + - key: type + value: + stringValue: heartbeat + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" unit: '{connections}' - description: Percentage of the node's memory which is still free gauge: dataPoints: - - asInt: "76" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + - asInt: "55" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" name: aerospike.node.memory.free unit: '%' scope: @@ -118,15 +118,15 @@ resourceMetrics: stringValue: test - key: aerospike.node.name value: - stringValue: BB9040011AC4202 + stringValue: BB9030011AC4202 scopeMetrics: - metrics: - description: Minimum percentage of contiguous disk space free to the namespace across all devices gauge: dataPoints: - asInt: "99" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" name: aerospike.namespace.disk.available unit: '%' - description: Number of cell coverings for query region queried @@ -135,8 +135,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "9" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{cells}' - description: Number of points outside the region. @@ -145,8 +145,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{points}' - description: Number of points within the region. @@ -155,8 +155,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "4" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{points}' - description: Number of geojson queries on the system since the uptime of the node. @@ -165,16 +165,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{queries}' - description: Percentage of the namespace's memory which is still free gauge: dataPoints: - asInt: "96" - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" name: aerospike.namespace.memory.free unit: '%' - description: Memory currently used by each component of the namespace @@ -182,34 +182,34 @@ resourceMetrics: sum: aggregationTemporality: 2 dataPoints: - - asInt: "33554432" + - asInt: "0" attributes: - key: component value: - stringValue: secondary_index - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: data + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "6720" attributes: - key: component value: stringValue: index - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "33554432" attributes: - key: component value: - stringValue: data - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: secondary_index + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - key: component value: stringValue: set_index - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" unit: By - description: Number of query operations performed on the namespace name: aerospike.namespace.query.count @@ -218,342 +218,342 @@ resourceMetrics: dataPoints: - asInt: "0" attributes: - - key: type - value: - stringValue: udf_background - key: index value: - stringValue: secondary + stringValue: primary - key: result value: stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: - stringValue: long_basic + stringValue: aggregation + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: - stringValue: secondary + stringValue: primary - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: + stringValue: abort - key: type value: - stringValue: short_basic + stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: primary - key: result value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: abort - key: type value: - stringValue: udf_background + stringValue: ops_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: primary - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: abort - key: type value: - stringValue: long_basic + stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: stringValue: primary - key: result value: - stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: complete - key: type value: stringValue: aggregation + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: - stringValue: secondary + stringValue: primary - key: result value: - stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: complete - key: type value: stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: - stringValue: secondary + stringValue: primary - key: result value: - stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: complete - key: type value: stringValue: short_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: stringValue: primary - key: result value: - stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: complete - key: type value: - stringValue: short_basic + stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: - stringValue: secondary + stringValue: primary - key: result value: stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: - key: type value: stringValue: aggregation - - key: index - value: - stringValue: secondary - - key: result - value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - - key: type - value: - stringValue: short_basic - key: index value: stringValue: primary - key: result value: stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: primary - key: result value: stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: - key: type value: stringValue: short_basic - - key: index - value: - stringValue: secondary - - key: result - value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" attributes: - - key: type - value: - stringValue: long_basic - key: index value: stringValue: primary - key: result value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: + stringValue: error - key: type value: stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: primary - key: result value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: timeout - key: type value: - stringValue: aggregation + stringValue: short_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: - stringValue: primary + stringValue: secondary - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: abort - key: type value: - stringValue: udf_background + stringValue: aggregation + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: - stringValue: primary + stringValue: secondary - key: result value: stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "2" - attributes: - key: type value: stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: secondary - key: result value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: abort - key: type value: stringValue: ops_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: secondary - key: result value: stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: stringValue: secondary - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: + stringValue: complete - key: type value: stringValue: aggregation + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "2" + attributes: - key: index value: - stringValue: primary + stringValue: secondary - key: result value: stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: - stringValue: aggregation + stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: - stringValue: primary + stringValue: secondary - key: result value: - stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: complete - key: type value: - stringValue: aggregation + stringValue: short_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "1" + attributes: - key: index value: stringValue: secondary - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "1" - attributes: + stringValue: complete - key: type value: stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: secondary - key: result value: - stringValue: complete - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: error + - key: type + value: + stringValue: aggregation + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: index + value: + stringValue: secondary + - key: result + value: + stringValue: error - key: type value: - stringValue: ops_background + stringValue: long_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: - stringValue: primary + stringValue: secondary - key: result value: - stringValue: abort - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: error + - key: type + value: + stringValue: short_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: index + value: + stringValue: secondary + - key: result + value: + stringValue: error - key: type value: - stringValue: short_basic + stringValue: udf_background + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: index value: stringValue: secondary - key: result value: stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + - key: type + value: + stringValue: short_basic + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{queries}' - description: Number of transactions performed on the namespace @@ -563,174 +563,174 @@ resourceMetrics: dataPoints: - asInt: "0" attributes: - - key: type - value: - stringValue: read - key: result value: - stringValue: success - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: error - key: type value: - stringValue: write - - key: result - value: - stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: delete + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - - key: type - value: - stringValue: write - key: result value: - stringValue: filtered_out - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: + stringValue: error - key: type value: stringValue: read - - key: result - value: - stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: error - key: type value: - stringValue: delete + stringValue: udf + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: result value: - stringValue: not_found - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: error + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: filtered_out - key: type value: stringValue: delete - - key: result - value: - stringValue: success - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - - key: type - value: - stringValue: read - key: result value: stringValue: filtered_out - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: stringValue: read - - key: result - value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: filtered_out - key: type value: stringValue: udf + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: result value: stringValue: filtered_out - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: not_found - key: type value: stringValue: delete + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: result value: - stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: not_found + - key: type + value: + stringValue: read + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: success - key: type value: stringValue: delete + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: result value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "105" - attributes: + stringValue: success - key: type value: - stringValue: write + stringValue: read + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "105" + attributes: - key: result value: stringValue: success - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: - stringValue: udf + stringValue: write + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" + - asInt: "0" + attributes: - key: result value: stringValue: timeout - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" - - asInt: "0" - attributes: - key: type value: - stringValue: write - - key: result - value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: delete + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: timeout - key: type value: stringValue: read - - key: result - value: - stringValue: not_found - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: + - key: result + value: + stringValue: timeout - key: type value: stringValue: udf - - key: result - value: - stringValue: error - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" - asInt: "0" attributes: - - key: type - value: - stringValue: delete - key: result value: - stringValue: filtered_out - startTimeUnixNano: "1663263782604581000" - timeUnixNano: "1663263782711204000" + stringValue: timeout + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204273452385000" + timeUnixNano: "1687204274486342000" isMonotonic: true unit: '{transactions}' scope: diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_all_db.yaml b/receiver/postgresqlreceiver/testdata/integration/expected_all_db.yaml index b11febce1a73..cb9e5c7b747c 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_all_db.yaml +++ b/receiver/postgresqlreceiver/testdata/integration/expected_all_db.yaml @@ -1,4 +1,221 @@ resourceMetrics: + - resource: + attributes: [] + scopeMetrics: + - metrics: + - description: Number of buffers allocated. + name: postgresql.bgwriter.buffers.allocated + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "463" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: '{buffers}' + - description: Number of buffers written. + name: postgresql.bgwriter.buffers.writes + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "6" + attributes: + - key: source + value: + stringValue: backend + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: backend_fsync + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: bgwriter + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "63" + attributes: + - key: source + value: + stringValue: checkpoints + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: '{buffers}' + - description: The number of checkpoints performed. + name: postgresql.bgwriter.checkpoint.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "4" + attributes: + - key: type + value: + stringValue: requested + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "0" + attributes: + - key: type + value: + stringValue: scheduled + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: '{checkpoints}' + - description: Total time spent writing and syncing files to disk by checkpoints. + name: postgresql.bgwriter.duration + sum: + aggregationTemporality: 2 + dataPoints: + - asDouble: 11 + attributes: + - key: type + value: + stringValue: sync + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asDouble: 9 + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: ms + - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. + name: postgresql.bgwriter.maxwritten + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: '{stoppages}' + - description: Configured maximum number of client connections allowed + gauge: + dataPoints: + - asInt: "100" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + name: postgresql.connection.max + unit: '{connections}' + - description: Number of user databases. + name: postgresql.database.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "3" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: '{databases}' + scope: + name: otelcol/postgresqlreceiver + version: latest + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel + scopeMetrics: + - metrics: + - description: The number of commits. + name: postgresql.commits + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "6" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: "1" + - description: The database disk usage. + name: postgresql.db_size + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7176708" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: By + - description: The number of rollbacks. + name: postgresql.rollbacks + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: "1" + - description: Number of user tables in a database. + name: postgresql.table.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: '{tables}' + scope: + name: otelcol/postgresqlreceiver + version: latest + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel2 + scopeMetrics: + - metrics: + - description: The number of commits. + name: postgresql.commits + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: "1" + - description: The database disk usage. + name: postgresql.db_size + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7217668" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: By + - description: The number of rollbacks. + name: postgresql.rollbacks + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + isMonotonic: true + unit: "1" + - description: Number of user tables in a database. + name: postgresql.table.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: '{tables}' + scope: + name: otelcol/postgresqlreceiver + version: latest - resource: attributes: - key: postgresql.database.name @@ -12,17 +229,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "3" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: "1" - description: The number of commits. name: postgresql.commits sum: aggregationTemporality: 2 dataPoints: - - asInt: "51" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + - asInt: "6" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The database disk usage. @@ -31,17 +248,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "7223832" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: By - description: The number of rollbacks. name: postgresql.rollbacks sum: aggregationTemporality: 2 dataPoints: - - asInt: "5" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + - asInt: "0" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: Number of user tables in a database. @@ -50,8 +267,9 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + unit: '{tables}' scope: name: otelcol/postgresqlreceiver version: latest @@ -62,7 +280,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table2 + stringValue: public.table1 scopeMetrics: - metrics: - description: The number of blocks read. @@ -74,58 +292,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -137,30 +355,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: del + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: hot_upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: ins + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -173,15 +391,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -189,8 +407,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -198,8 +416,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{vacuums}' scope: @@ -212,7 +430,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table1 + stringValue: public.table2 scopeMetrics: - metrics: - description: The number of blocks read. @@ -224,58 +442,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -287,30 +505,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: del + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: hot_upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: ins + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -323,150 +541,35 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: "1" - description: Disk space used by a table. - name: postgresql.table.size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - unit: By - - description: Number of times a table has manually been vacuumed. - name: postgresql.table.vacuum.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: '{vacuums}' - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - scopeMetrics: - - metrics: - - description: The number of commits. - name: postgresql.commits - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "26" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: "1" - - description: The database disk usage. - name: postgresql.db_size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "7281176" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - unit: By - - description: The number of rollbacks. - name: postgresql.rollbacks - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: "1" - - description: Number of user tables in a database. - name: postgresql.table.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - - key: postgresql.table.name - value: - stringValue: table1 - - key: postgresql.index.name - value: - stringValue: table1_pkey - scopeMetrics: - - metrics: - - description: The number of index scans on a table. - name: postgresql.index.scans + name: postgresql.table.size sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: '{scans}' - - description: The size of the index on disk. - gauge: - dataPoints: - - asInt: "8192" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - name: postgresql.index.size + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: By - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - - key: postgresql.table.name - value: - stringValue: table2 - - key: postgresql.index.name - value: - stringValue: table2_pkey - scopeMetrics: - - metrics: - - description: The number of index scans on a table. - name: postgresql.index.scans + - description: Number of times a table has manually been vacuumed. + name: postgresql.table.vacuum.count sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true - unit: '{scans}' - - description: The size of the index on disk. - gauge: - dataPoints: - - asInt: "8192" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - name: postgresql.index.size - unit: By + unit: '{vacuums}' scope: name: otelcol/postgresqlreceiver version: latest @@ -489,58 +592,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -552,30 +655,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: del + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: hot_upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: ins + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -588,15 +691,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -604,8 +707,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -613,8 +716,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{vacuums}' scope: @@ -639,58 +742,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: heap_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "1" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "4" + stringValue: heap_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "2" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "2" + stringValue: idx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "4" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: idx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: tidx_read + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: toast_hit + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -698,34 +801,34 @@ resourceMetrics: sum: aggregationTemporality: 2 dataPoints: - - asInt: "1" + - asInt: "0" attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: del + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "0" + stringValue: hot_upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + - asInt: "1" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: ins + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + stringValue: upd + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -738,15 +841,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" - asInt: "1" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -754,8 +857,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -763,8 +866,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{vacuums}' scope: @@ -774,46 +877,33 @@ resourceMetrics: attributes: - key: postgresql.database.name value: - stringValue: otel2 + stringValue: otel + - key: postgresql.index.name + value: + stringValue: table1_pkey + - key: postgresql.table.name + value: + stringValue: table1 scopeMetrics: - metrics: - - description: The number of commits. - name: postgresql.commits - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "17" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: "1" - - description: The database disk usage. - name: postgresql.db_size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "7322136" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - unit: By - - description: The number of rollbacks. - name: postgresql.rollbacks + - description: The number of index scans on a table. + name: postgresql.index.scans sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true - unit: "1" - - description: Number of user tables in a database. - name: postgresql.table.count - sum: - aggregationTemporality: 2 + unit: '{scans}' + - description: The size of the index on disk. + gauge: dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + - asInt: "8192" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + name: postgresql.index.size + unit: By scope: name: otelcol/postgresqlreceiver version: latest @@ -821,13 +911,13 @@ resourceMetrics: attributes: - key: postgresql.database.name value: - stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test1 + stringValue: otel - key: postgresql.index.name value: - stringValue: test1_pkey + stringValue: table2_pkey + - key: postgresql.table.name + value: + stringValue: table2 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -836,16 +926,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" name: postgresql.index.size unit: By scope: @@ -856,12 +946,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 + - key: postgresql.index.name + value: + stringValue: otel2index - key: postgresql.table.name value: stringValue: test2 - - key: postgresql.index.name - value: - stringValue: test2_pkey scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -870,16 +960,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "16384" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" name: postgresql.index.size unit: By scope: @@ -890,12 +980,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test1 - key: postgresql.index.name value: stringValue: otelindex + - key: postgresql.table.name + value: + stringValue: test1 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -904,16 +994,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" name: postgresql.index.size unit: By scope: @@ -924,12 +1014,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test2 - key: postgresql.index.name value: - stringValue: otel2index + stringValue: test1_pkey + - key: postgresql.table.name + value: + stringValue: test1 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -938,137 +1028,52 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - - asInt: "16384" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + - asInt: "8192" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" name: postgresql.index.size unit: By scope: name: otelcol/postgresqlreceiver version: latest - - resource: {} + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel2 + - key: postgresql.index.name + value: + stringValue: test2_pkey + - key: postgresql.table.name + value: + stringValue: test2 scopeMetrics: - metrics: - - description: Number of buffers allocated. - name: postgresql.bgwriter.buffers.allocated - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "774" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: '{buffers}' - - description: Number of buffers written. - name: postgresql.bgwriter.buffers.writes - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - attributes: - - key: source - value: - stringValue: bgwriter - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "5" - attributes: - - key: source - value: - stringValue: backend - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "60" - attributes: - - key: source - value: - stringValue: checkpoints - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "0" - attributes: - - key: source - value: - stringValue: backend_fsync - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: '{buffers}' - - description: The number of checkpoints performed. - name: postgresql.bgwriter.checkpoint.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "4" - attributes: - - key: type - value: - stringValue: requested - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asInt: "0" - attributes: - - key: type - value: - stringValue: scheduled - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: '{checkpoints}' - - description: Total time spent writing and syncing files to disk by checkpoints. - name: postgresql.bgwriter.duration - sum: - aggregationTemporality: 2 - dataPoints: - - asDouble: 16 - attributes: - - key: type - value: - stringValue: sync - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - - asDouble: 10 - attributes: - - key: type - value: - stringValue: write - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - isMonotonic: true - unit: ms - - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. - name: postgresql.bgwriter.maxwritten + - description: The number of index scans on a table. + name: postgresql.index.scans sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" isMonotonic: true - - description: Configured maximum number of client connections allowed + unit: '{scans}' + - description: The size of the index on disk. gauge: dataPoints: - - asInt: "100" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - name: postgresql.connection.max - unit: '{connections}' - - description: Number of user databases. - name: postgresql.database.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "3" - startTimeUnixNano: "1662565933924183000" - timeUnixNano: "1662565943934293000" - unit: '{databases}' + - asInt: "16384" + startTimeUnixNano: "1687204205772645000" + timeUnixNano: "1687204206783594000" + name: postgresql.index.size + unit: By scope: name: otelcol/postgresqlreceiver version: latest diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.yaml b/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.yaml index 9860a2f7ec18..9ec58e42b3b0 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.yaml +++ b/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.yaml @@ -1,4 +1,221 @@ resourceMetrics: + - resource: + attributes: [] + scopeMetrics: + - metrics: + - description: Number of buffers allocated. + name: postgresql.bgwriter.buffers.allocated + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "743" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: '{buffers}' + - description: Number of buffers written. + name: postgresql.bgwriter.buffers.writes + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "5" + attributes: + - key: source + value: + stringValue: backend + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: backend_fsync + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: bgwriter + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "60" + attributes: + - key: source + value: + stringValue: checkpoints + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: '{buffers}' + - description: The number of checkpoints performed. + name: postgresql.bgwriter.checkpoint.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "4" + attributes: + - key: type + value: + stringValue: requested + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "0" + attributes: + - key: type + value: + stringValue: scheduled + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: '{checkpoints}' + - description: Total time spent writing and syncing files to disk by checkpoints. + name: postgresql.bgwriter.duration + sum: + aggregationTemporality: 2 + dataPoints: + - asDouble: 25 + attributes: + - key: type + value: + stringValue: sync + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asDouble: 36 + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: ms + - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. + name: postgresql.bgwriter.maxwritten + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: '{stoppages}' + - description: Configured maximum number of client connections allowed + gauge: + dataPoints: + - asInt: "100" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + name: postgresql.connection.max + unit: '{connections}' + - description: Number of user databases. + name: postgresql.database.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + unit: '{databases}' + scope: + name: otelcol/postgresqlreceiver + version: latest + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel + scopeMetrics: + - metrics: + - description: The number of commits. + name: postgresql.commits + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "6" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: "1" + - description: The database disk usage. + name: postgresql.db_size + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7193092" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + unit: By + - description: The number of rollbacks. + name: postgresql.rollbacks + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: "1" + - description: Number of user tables in a database. + name: postgresql.table.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + unit: '{tables}' + scope: + name: otelcol/postgresqlreceiver + version: latest + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel2 + scopeMetrics: + - metrics: + - description: The number of commits. + name: postgresql.commits + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: "1" + - description: The database disk usage. + name: postgresql.db_size + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7234052" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + unit: By + - description: The number of rollbacks. + name: postgresql.rollbacks + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + isMonotonic: true + unit: "1" + - description: Number of user tables in a database. + name: postgresql.table.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + unit: '{tables}' + scope: + name: otelcol/postgresqlreceiver + version: latest - resource: attributes: - key: postgresql.database.name @@ -6,7 +223,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table2 + stringValue: public.table1 scopeMetrics: - metrics: - description: The number of blocks read. @@ -18,58 +235,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -81,30 +298,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: del + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: hot_upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: ins + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -117,15 +334,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -133,8 +350,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -142,8 +359,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{vacuums}' scope: @@ -156,7 +373,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table1 + stringValue: public.table2 scopeMetrics: - metrics: - description: The number of blocks read. @@ -168,58 +385,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -231,30 +448,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: del + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: hot_upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: ins + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -267,150 +484,35 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: "1" - description: Disk space used by a table. - name: postgresql.table.size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - unit: By - - description: Number of times a table has manually been vacuumed. - name: postgresql.table.vacuum.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: '{vacuums}' - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - scopeMetrics: - - metrics: - - description: The number of commits. - name: postgresql.commits - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "14" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: "1" - - description: The database disk usage. - name: postgresql.db_size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "7281176" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - unit: By - - description: The number of rollbacks. - name: postgresql.rollbacks - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: "1" - - description: Number of user tables in a database. - name: postgresql.table.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - - key: postgresql.table.name - value: - stringValue: table1 - - key: postgresql.index.name - value: - stringValue: table1_pkey - scopeMetrics: - - metrics: - - description: The number of index scans on a table. - name: postgresql.index.scans - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: '{scans}' - - description: The size of the index on disk. - gauge: + name: postgresql.table.size + sum: + aggregationTemporality: 2 dataPoints: - - asInt: "8192" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - name: postgresql.index.size + - asInt: "0" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: By - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name - value: - stringValue: otel - - key: postgresql.table.name - value: - stringValue: table2 - - key: postgresql.index.name - value: - stringValue: table2_pkey - scopeMetrics: - - metrics: - - description: The number of index scans on a table. - name: postgresql.index.scans + - description: Number of times a table has manually been vacuumed. + name: postgresql.table.vacuum.count sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true - unit: '{scans}' - - description: The size of the index on disk. - gauge: - dataPoints: - - asInt: "8192" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - name: postgresql.index.size - unit: By + unit: '{vacuums}' scope: name: otelcol/postgresqlreceiver version: latest @@ -433,58 +535,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -496,30 +598,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: del + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: hot_upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: ins + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -532,15 +634,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -548,8 +650,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -557,8 +659,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{vacuums}' scope: @@ -583,58 +685,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: heap_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "1" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "4" + stringValue: heap_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "2" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "2" + stringValue: idx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "4" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: idx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: tidx_read + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: toast_hit + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -642,34 +744,34 @@ resourceMetrics: sum: aggregationTemporality: 2 dataPoints: - - asInt: "1" + - asInt: "0" attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: del + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "0" + stringValue: hot_upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + - asInt: "1" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: ins + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + stringValue: upd + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -682,15 +784,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" - asInt: "1" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -698,8 +800,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -707,8 +809,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{vacuums}' scope: @@ -718,46 +820,33 @@ resourceMetrics: attributes: - key: postgresql.database.name value: - stringValue: otel2 + stringValue: otel + - key: postgresql.index.name + value: + stringValue: table1_pkey + - key: postgresql.table.name + value: + stringValue: table1 scopeMetrics: - metrics: - - description: The number of commits. - name: postgresql.commits - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "9" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: "1" - - description: The database disk usage. - name: postgresql.db_size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "7322136" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - unit: By - - description: The number of rollbacks. - name: postgresql.rollbacks + - description: The number of index scans on a table. + name: postgresql.index.scans sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true - unit: "1" - - description: Number of user tables in a database. - name: postgresql.table.count - sum: - aggregationTemporality: 2 + unit: '{scans}' + - description: The size of the index on disk. + gauge: dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + - asInt: "8192" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + name: postgresql.index.size + unit: By scope: name: otelcol/postgresqlreceiver version: latest @@ -765,13 +854,13 @@ resourceMetrics: attributes: - key: postgresql.database.name value: - stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test1 + stringValue: otel - key: postgresql.index.name value: - stringValue: test1_pkey + stringValue: table2_pkey + - key: postgresql.table.name + value: + stringValue: table2 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -780,16 +869,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" name: postgresql.index.size unit: By scope: @@ -800,12 +889,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 + - key: postgresql.index.name + value: + stringValue: otel2index - key: postgresql.table.name value: stringValue: test2 - - key: postgresql.index.name - value: - stringValue: test2_pkey scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -814,16 +903,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "16384" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" name: postgresql.index.size unit: By scope: @@ -834,12 +923,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test1 - key: postgresql.index.name value: stringValue: otelindex + - key: postgresql.table.name + value: + stringValue: test1 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -848,16 +937,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" name: postgresql.index.size unit: By scope: @@ -868,12 +957,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel2 - - key: postgresql.table.name - value: - stringValue: test2 - key: postgresql.index.name value: - stringValue: otel2index + stringValue: test1_pkey + - key: postgresql.table.name + value: + stringValue: test1 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -882,137 +971,52 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - - asInt: "16384" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + - asInt: "8192" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" name: postgresql.index.size unit: By scope: name: otelcol/postgresqlreceiver version: latest - - resource: {} + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel2 + - key: postgresql.index.name + value: + stringValue: test2_pkey + - key: postgresql.table.name + value: + stringValue: test2 scopeMetrics: - metrics: - - description: Number of buffers allocated. - name: postgresql.bgwriter.buffers.allocated - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "665" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: '{buffers}' - - description: Number of buffers written. - name: postgresql.bgwriter.buffers.writes - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - attributes: - - key: source - value: - stringValue: bgwriter - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "5" - attributes: - - key: source - value: - stringValue: backend - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "60" - attributes: - - key: source - value: - stringValue: checkpoints - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "0" - attributes: - - key: source - value: - stringValue: backend_fsync - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: '{buffers}' - - description: The number of checkpoints performed. - name: postgresql.bgwriter.checkpoint.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "4" - attributes: - - key: type - value: - stringValue: requested - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asInt: "0" - attributes: - - key: type - value: - stringValue: scheduled - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: '{checkpoints}' - - description: Total time spent writing and syncing files to disk by checkpoints. - name: postgresql.bgwriter.duration - sum: - aggregationTemporality: 2 - dataPoints: - - asDouble: 16 - attributes: - - key: type - value: - stringValue: sync - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - - asDouble: 10 - attributes: - - key: type - value: - stringValue: write - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - isMonotonic: true - unit: ms - - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. - name: postgresql.bgwriter.maxwritten + - description: The number of index scans on a table. + name: postgresql.index.scans sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" isMonotonic: true - - description: Configured maximum number of client connections allowed + unit: '{scans}' + - description: The size of the index on disk. gauge: dataPoints: - - asInt: "100" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - name: postgresql.connection.max - unit: '{connections}' - - description: Number of user databases. - name: postgresql.database.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565922919465000" - timeUnixNano: "1662565932919535000" - unit: '{databases}' + - asInt: "16384" + startTimeUnixNano: "1687204195674854000" + timeUnixNano: "1687204196675318000" + name: postgresql.index.size + unit: By scope: name: otelcol/postgresqlreceiver version: latest diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_single_db.yaml b/receiver/postgresqlreceiver/testdata/integration/expected_single_db.yaml index f567faf2ca6d..d66e1ae98c8b 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_single_db.yaml +++ b/receiver/postgresqlreceiver/testdata/integration/expected_single_db.yaml @@ -1,4 +1,173 @@ resourceMetrics: + - resource: + attributes: [] + scopeMetrics: + - metrics: + - description: Number of buffers allocated. + name: postgresql.bgwriter.buffers.allocated + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "289" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: '{buffers}' + - description: Number of buffers written. + name: postgresql.bgwriter.buffers.writes + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "5" + attributes: + - key: source + value: + stringValue: backend + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: backend_fsync + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + - asInt: "0" + attributes: + - key: source + value: + stringValue: bgwriter + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + - asInt: "60" + attributes: + - key: source + value: + stringValue: checkpoints + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: '{buffers}' + - description: The number of checkpoints performed. + name: postgresql.bgwriter.checkpoint.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "4" + attributes: + - key: type + value: + stringValue: requested + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + - asInt: "0" + attributes: + - key: type + value: + stringValue: scheduled + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: '{checkpoints}' + - description: Total time spent writing and syncing files to disk by checkpoints. + name: postgresql.bgwriter.duration + sum: + aggregationTemporality: 2 + dataPoints: + - asDouble: 17 + attributes: + - key: type + value: + stringValue: sync + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + - asDouble: 11 + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: ms + - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. + name: postgresql.bgwriter.maxwritten + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: '{stoppages}' + - description: Configured maximum number of client connections allowed + gauge: + dataPoints: + - asInt: "100" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + name: postgresql.connection.max + unit: '{connections}' + - description: Number of user databases. + name: postgresql.database.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + unit: '{databases}' + scope: + name: otelcol/postgresqlreceiver + version: latest + - resource: + attributes: + - key: postgresql.database.name + value: + stringValue: otel + scopeMetrics: + - metrics: + - description: The number of commits. + name: postgresql.commits + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "6" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: "1" + - description: The database disk usage. + name: postgresql.db_size + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "7193092" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + unit: By + - description: The number of rollbacks. + name: postgresql.rollbacks + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + isMonotonic: true + unit: "1" + - description: Number of user tables in a database. + name: postgresql.table.count + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" + unit: '{tables}' + scope: + name: otelcol/postgresqlreceiver + version: latest - resource: attributes: - key: postgresql.database.name @@ -6,7 +175,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table2 + stringValue: public.table1 scopeMetrics: - metrics: - description: The number of blocks read. @@ -18,58 +187,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: heap_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: heap_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: idx_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: idx_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: tidx_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: tidx_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: toast_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: toast_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -81,30 +250,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: del + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: hot_upd + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: ins + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: upd + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -117,15 +286,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -133,8 +302,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -142,8 +311,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: '{vacuums}' scope: @@ -156,7 +325,7 @@ resourceMetrics: stringValue: otel - key: postgresql.table.name value: - stringValue: public.table1 + stringValue: public.table2 scopeMetrics: - metrics: - description: The number of blocks read. @@ -168,58 +337,58 @@ resourceMetrics: attributes: - key: source value: - stringValue: heap_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: heap_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: heap_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: heap_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: idx_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: idx_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: idx_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: idx_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: tidx_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: toast_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: tidx_read + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_read - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: toast_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: source value: - stringValue: tidx_hit - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: toast_hit + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: "1" - description: The number of db row operations. @@ -231,30 +400,30 @@ resourceMetrics: attributes: - key: operation value: - stringValue: ins - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: del + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: del - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: hot_upd + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: upd - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: ins + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: operation value: - stringValue: hot_upd - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + stringValue: upd + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: "1" - description: The number of rows in the database. @@ -267,15 +436,15 @@ resourceMetrics: - key: state value: stringValue: dead - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" - asInt: "0" attributes: - key: state value: stringValue: live - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" unit: "1" - description: Disk space used by a table. name: postgresql.table.size @@ -283,8 +452,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" unit: By - description: Number of times a table has manually been vacuumed. name: postgresql.table.vacuum.count @@ -292,8 +461,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: '{vacuums}' scope: @@ -304,59 +473,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel - scopeMetrics: - - metrics: - - description: The number of commits. - name: postgresql.commits - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "6" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: "1" - - description: The database disk usage. - name: postgresql.db_size - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "7168516" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - unit: By - - description: The number of rollbacks. - name: postgresql.rollbacks - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: "1" - - description: Number of user tables in a database. - name: postgresql.table.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "2" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - scope: - name: otelcol/postgresqlreceiver - version: latest - - resource: - attributes: - - key: postgresql.database.name + - key: postgresql.index.name value: - stringValue: otel + stringValue: table1_pkey - key: postgresql.table.name value: stringValue: table1 - - key: postgresql.index.name - value: - stringValue: table1_pkey scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -365,16 +487,16 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" name: postgresql.index.size unit: By scope: @@ -385,12 +507,12 @@ resourceMetrics: - key: postgresql.database.name value: stringValue: otel - - key: postgresql.table.name - value: - stringValue: table2 - key: postgresql.index.name value: stringValue: table2_pkey + - key: postgresql.table.name + value: + stringValue: table2 scopeMetrics: - metrics: - description: The number of index scans on a table. @@ -399,137 +521,18 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" isMonotonic: true unit: '{scans}' - description: The size of the index on disk. gauge: dataPoints: - asInt: "8192" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" + startTimeUnixNano: "1687204184149188000" + timeUnixNano: "1687204185149778000" name: postgresql.index.size unit: By scope: name: otelcol/postgresqlreceiver version: latest - - resource: {} - scopeMetrics: - - metrics: - - description: Number of buffers allocated. - name: postgresql.bgwriter.buffers.allocated - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "289" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: '{buffers}' - - description: Number of buffers written. - name: postgresql.bgwriter.buffers.writes - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - attributes: - - key: source - value: - stringValue: bgwriter - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - - asInt: "5" - attributes: - - key: source - value: - stringValue: backend - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - - asInt: "60" - attributes: - - key: source - value: - stringValue: checkpoints - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - - asInt: "0" - attributes: - - key: source - value: - stringValue: backend_fsync - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: '{buffers}' - - description: The number of checkpoints performed. - name: postgresql.bgwriter.checkpoint.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "4" - attributes: - - key: type - value: - stringValue: requested - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - - asInt: "0" - attributes: - - key: type - value: - stringValue: scheduled - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: '{checkpoints}' - - description: Total time spent writing and syncing files to disk by checkpoints. - name: postgresql.bgwriter.duration - sum: - aggregationTemporality: 2 - dataPoints: - - asDouble: 16 - attributes: - - key: type - value: - stringValue: sync - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - - asDouble: 10 - attributes: - - key: type - value: - stringValue: write - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - unit: ms - - description: Number of times the background writer stopped a cleaning scan because it had written too many buffers. - name: postgresql.bgwriter.maxwritten - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "0" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - isMonotonic: true - - description: Configured maximum number of client connections allowed - gauge: - dataPoints: - - asInt: "100" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - name: postgresql.connection.max - unit: '{connections}' - - description: Number of user databases. - name: postgresql.database.count - sum: - aggregationTemporality: 2 - dataPoints: - - asInt: "1" - startTimeUnixNano: "1662565911916254000" - timeUnixNano: "1662565921917209000" - unit: '{databases}' - scope: - name: otelcol/postgresqlreceiver - version: latest diff --git a/receiver/redisreceiver/testdata/integration/expected.yaml b/receiver/redisreceiver/testdata/integration/expected.yaml index 5553ff6408e1..99cd66873be7 100644 --- a/receiver/redisreceiver/testdata/integration/expected.yaml +++ b/receiver/redisreceiver/testdata/integration/expected.yaml @@ -12,36 +12,38 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + unit: '{clients}' - description: Number of client connections (excluding connections from replicas) name: redis.clients.connected sum: aggregationTemporality: 2 dataPoints: - asInt: "1" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + unit: '{clients}' - description: Biggest input buffer among current client connections gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.clients.max_input_buffer - description: Longest output list among current client connections gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.clients.max_output_buffer - description: Number of commands processed per second gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.commands unit: '{ops}/s' - description: Total number of commands processed by the server @@ -50,60 +52,63 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{commands}' - description: Total number of connections accepted by the server name: redis.connections.received sum: aggregationTemporality: 2 dataPoints: - asInt: "2" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{connections}' - description: Number of connections rejected because of maxclients limit name: redis.connections.rejected sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{connections}' - description: System CPU consumed by the Redis server in seconds since server start name: redis.cpu.time sum: aggregationTemporality: 2 dataPoints: - - asDouble: 0.028353 + - asDouble: 0.048068 attributes: - key: state value: stringValue: sys - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" - - asDouble: 0.003908 + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + - asDouble: 0.002637 attributes: - key: state value: stringValue: sys_children - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" - - asDouble: 0.02064 + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + - asDouble: 0.037081 attributes: - key: state value: stringValue: user - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" - - asDouble: 0 + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + - asDouble: 0.002038 attributes: - key: state value: stringValue: user_children - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true unit: s - description: Number of evicted keys due to maxmemory limit @@ -112,81 +117,86 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{keys}' - description: Total number of key expiration events name: redis.keys.expired sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{events}' - description: Number of successful lookup of keys in the main dictionary name: redis.keyspace.hits sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{hits}' - description: Number of failed lookup of keys in the main dictionary name: redis.keyspace.misses sum: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true + unit: '{misses}' - description: Duration of the latest fork operation in microseconds gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.latest_fork unit: us - description: Ratio between used_memory_rss and used_memory gauge: dataPoints: - - asDouble: 8.36 - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + - asDouble: 9.8 + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.memory.fragmentation_ratio + unit: "1" - description: Number of bytes used by the Lua engine gauge: dataPoints: - asInt: "37888" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.memory.lua unit: By - description: Peak memory consumed by Redis (in bytes) gauge: dataPoints: - - asInt: "899120" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + - asInt: "865328" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.memory.peak unit: By - description: Number of bytes that Redis allocated as seen by the operating system gauge: dataPoints: - - asInt: "6987776" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + - asInt: "7860224" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.memory.rss unit: By - description: Total number of bytes allocated by Redis using its allocator gauge: dataPoints: - - asInt: "899120" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + - asInt: "865328" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.memory.used unit: By - description: The total number of bytes read from the network @@ -195,8 +205,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "23" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true unit: By - description: The total number of bytes written to the network @@ -205,8 +215,8 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true unit: By - description: Number of changes since the last dump @@ -215,21 +225,22 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + unit: '{changes}' - description: The master offset of the replication backlog buffer gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.replication.backlog_first_byte_offset - description: The server's current replication offset gauge: dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" name: redis.replication.offset - description: Number of connected replicas name: redis.slaves.connected @@ -237,16 +248,17 @@ resourceMetrics: aggregationTemporality: 2 dataPoints: - asInt: "0" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" + unit: '{replicas}' - description: Number of seconds since Redis server start name: redis.uptime sum: aggregationTemporality: 2 dataPoints: - - asInt: "10" - startTimeUnixNano: "1684788673549655000" - timeUnixNano: "1684788683549655000" + - asInt: "1" + startTimeUnixNano: "1687204133525156000" + timeUnixNano: "1687204134525156000" isMonotonic: true unit: s scope: