From e6b6ac705e77f53dc11eede1a04cd71933e2184c Mon Sep 17 00:00:00 2001 From: Keith Schmitt <32067685+schmikei@users.noreply.github.com> Date: Tue, 6 Sep 2022 10:12:40 -0400 Subject: [PATCH] [receiver/postgresql] Transition `receiver/postgresql` to resource attributes by default (#13812) * transition postgresqlreceiver to use resource attributes by default --- .../postgresqlreceiver/integration_test.go | 10 +- receiver/postgresqlreceiver/scraper.go | 4 +- receiver/postgresqlreceiver/scraper_test.go | 13 +- .../testdata/integration/expected_all_db.json | 3509 +++++++++-------- ...expected_all_with_resource_attributes.json | 1956 --------- ...ected_all_without_resource_attributes.json | 1621 ++++++++ .../integration/expected_multi_db.json | 3390 +++++++++------- .../integration/expected_single_db.json | 1797 +++++---- .../postgres-resource-attributes-default.yaml | 17 + 9 files changed, 6469 insertions(+), 5848 deletions(-) delete mode 100644 receiver/postgresqlreceiver/testdata/integration/expected_all_with_resource_attributes.json create mode 100644 receiver/postgresqlreceiver/testdata/integration/expected_all_without_resource_attributes.json create mode 100755 unreleased/postgres-resource-attributes-default.yaml diff --git a/receiver/postgresqlreceiver/integration_test.go b/receiver/postgresqlreceiver/integration_test.go index 306fdab3ef49..648d14c8c382 100644 --- a/receiver/postgresqlreceiver/integration_test.go +++ b/receiver/postgresqlreceiver/integration_test.go @@ -93,10 +93,11 @@ func TestPostgreSQLIntegration(t *testing.T) { expectedFile: filepath.Join("testdata", "integration", "expected_all_db.json"), }, { - name: "with_resource_attributes", + name: "without_resource_attributes", cfg: func(hostname string) *Config { require.NoError(t, featuregate.GetRegistry().Apply(map[string]bool{ - emitMetricsWithResourceAttributesFeatureGateID: true, + emitMetricsWithResourceAttributesFeatureGateID: false, + emitMetricsWithoutResourceAttributesFeatureGateID: true, })) f := NewFactory() cfg := f.CreateDefaultConfig().(*Config) @@ -109,10 +110,11 @@ func TestPostgreSQLIntegration(t *testing.T) { }, cleanup: func() { require.NoError(t, featuregate.GetRegistry().Apply(map[string]bool{ - emitMetricsWithResourceAttributesFeatureGateID: false, + emitMetricsWithResourceAttributesFeatureGateID: true, + emitMetricsWithoutResourceAttributesFeatureGateID: false, })) }, - expectedFile: filepath.Join("testdata", "integration", "expected_all_with_resource_attributes.json"), + expectedFile: filepath.Join("testdata", "integration", "expected_all_without_resource_attributes.json"), }, } diff --git a/receiver/postgresqlreceiver/scraper.go b/receiver/postgresqlreceiver/scraper.go index e71d5f7264a8..bc1e064a0b22 100644 --- a/receiver/postgresqlreceiver/scraper.go +++ b/receiver/postgresqlreceiver/scraper.go @@ -39,7 +39,7 @@ const ( var ( emitMetricsWithoutResourceAttributes = featuregate.Gate{ ID: emitMetricsWithoutResourceAttributesFeatureGateID, - Enabled: true, + Enabled: false, Description: "Postgresql metrics are transitioning from being reported with identifying metric attributes " + "to being identified via resource attributes in order to fit the OpenTelemetry specification. This feature " + "gate controls emitting the old metrics without resource attributes. For more details, see: " + @@ -48,7 +48,7 @@ var ( emitMetricsWithResourceAttributes = featuregate.Gate{ ID: emitMetricsWithResourceAttributesFeatureGateID, - Enabled: false, + Enabled: true, Description: "Postgresql metrics are transitioning from being reported with identifying metric attributes " + "to being identified via resource attributes in order to fit the OpenTelemetry specification. This feature " + "gate controls emitting the new metrics with resource attributes. For more details, see: " + diff --git a/receiver/postgresqlreceiver/scraper_test.go b/receiver/postgresqlreceiver/scraper_test.go index 7dd5b9660b34..7c3b8a3dfb1e 100644 --- a/receiver/postgresqlreceiver/scraper_test.go +++ b/receiver/postgresqlreceiver/scraper_test.go @@ -35,6 +35,9 @@ func TestUnsuccessfulScrape(t *testing.T) { cfg.Endpoint = "fake:11111" scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, &defaultClientFactory{}) + scraper.emitMetricsWithResourceAttributes = false + scraper.emitMetricsWithoutResourceAttributes = true + actualMetrics, err := scraper.scrape(context.Background()) require.Error(t, err) @@ -48,6 +51,8 @@ func TestScraper(t *testing.T) { cfg := createDefaultConfig().(*Config) cfg.Databases = []string{"otel"} scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, factory) + scraper.emitMetricsWithResourceAttributes = false + scraper.emitMetricsWithoutResourceAttributes = true actualMetrics, err := scraper.scrape(context.Background()) require.NoError(t, err) @@ -65,6 +70,8 @@ func TestScraperNoDatabaseSingle(t *testing.T) { cfg := createDefaultConfig().(*Config) scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, factory) + scraper.emitMetricsWithResourceAttributes = false + scraper.emitMetricsWithoutResourceAttributes = true actualMetrics, err := scraper.scrape(context.Background()) require.NoError(t, err) @@ -82,6 +89,8 @@ func TestScraperNoDatabaseMultiple(t *testing.T) { cfg := createDefaultConfig().(*Config) scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, &factory) + scraper.emitMetricsWithResourceAttributes = false + scraper.emitMetricsWithoutResourceAttributes = true actualMetrics, err := scraper.scrape(context.Background()) require.NoError(t, err) @@ -99,8 +108,6 @@ func TestScraperWithResourceAttributeFeatureGate(t *testing.T) { cfg := createDefaultConfig().(*Config) scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, &factory) - scraper.emitMetricsWithResourceAttributes = true - scraper.emitMetricsWithoutResourceAttributes = false actualMetrics, err := scraper.scrape(context.Background()) require.NoError(t, err) @@ -118,8 +125,6 @@ func TestScraperWithResourceAttributeFeatureGateSingle(t *testing.T) { cfg := createDefaultConfig().(*Config) scraper := newPostgreSQLScraper(componenttest.NewNopReceiverCreateSettings(), cfg, &factory) - scraper.emitMetricsWithResourceAttributes = true - scraper.emitMetricsWithoutResourceAttributes = false actualMetrics, err := scraper.scrape(context.Background()) require.NoError(t, err) diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_all_db.json b/receiver/postgresqlreceiver/testdata/integration/expected_all_db.json index 4dfdc96b2825..e31be22584c8 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_all_db.json +++ b/receiver/postgresqlreceiver/testdata/integration/expected_all_db.json @@ -1,1555 +1,1956 @@ { - "resourceMetrics": [ - { - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "description": "The number of blocks read.", - "name": "postgresql.blocks_read", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of commits.", - "name": "postgresql.commits", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "72", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "postgres" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "257", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "79", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The database disk usage.", - "name": "postgresql.db_size", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "8758051", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "postgres" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "8766243", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "8766243", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ] - }, - "unit": "By" - }, - { - "description": "The number of backends.", - "name": "postgresql.backends", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "1", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of rows in the database.", - "name": "postgresql.rows", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of db row operations.", - "name": "postgresql.operations", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of rollbacks.", - "name": "postgresql.rollbacks", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "postgres" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658857440219000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658857440219000" - } - ], - "isMonotonic": true - }, - "unit": "1" - } - ] - } - ], - "resource": {} - } - ] -} + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "postgres" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "5" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "7127556" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table1" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.backends", + "description": "The number of backends.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "3" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "72" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "7297560" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "5" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.test1" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.test2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "2" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "1" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "8192" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "17" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "7338520" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test2" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "test2_pkey" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "16384" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test1" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "otelindex" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test2" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "otel2index" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "16384" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test1" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "test1_pkey" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.bgwriter.buffers.allocated", + "description": "Number of buffers allocated.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "656" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.buffers.writes", + "description": "Number of buffers written.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "bgwriter" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "5" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "checkpoints" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "60" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend_fsync" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.checkpoint.count", + "description": "The number of checkpoints performed.", + "unit": "{checkpoints}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "requested" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "scheduled" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.duration", + "description": "Total time spent writing and syncing files to disk by checkpoints.", + "unit": "ms", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "sync" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "43" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "write" + } + } + ], + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "26" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.maxwritten", + "description": "Number of times the background writer stopped a cleaning scan because it had written too many buffers.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.connection.max", + "description": "Configured maximum number of client connections allowed", + "unit": "{connections}", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "100" + } + ] + } + }, + { + "name": "postgresql.database.count", + "description": "Number of user databases.", + "unit": "{databases}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047113761805000", + "timeUnixNano": "1662047123772462000", + "asInt": "3" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_all_with_resource_attributes.json b/receiver/postgresqlreceiver/testdata/integration/expected_all_with_resource_attributes.json deleted file mode 100644 index 00a0273b3520..000000000000 --- a/receiver/postgresqlreceiver/testdata/integration/expected_all_with_resource_attributes.json +++ /dev/null @@ -1,1956 +0,0 @@ -{ - "resourceMetrics": [ - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "postgres" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.commits", - "description": "The number of commits.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "11" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.db_size", - "description": "The database disk usage.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "7240216" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.rollbacks", - "description": "The number of rollbacks.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.table.count", - "description": "Number of user tables in a database.", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "public.table1" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.blocks_read", - "description": "The number of blocks read.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.operations", - "description": "The number of db row operations.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.rows", - "description": "The number of rows in the database.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.size", - "description": "Disk space used by a table.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.vacuum.count", - "description": "Number of times a table has manually been vacuumed.", - "unit": "{vacuums}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "public.table2" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.blocks_read", - "description": "The number of blocks read.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.operations", - "description": "The number of db row operations.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.rows", - "description": "The number of rows in the database.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.size", - "description": "Disk space used by a table.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.vacuum.count", - "description": "Number of times a table has manually been vacuumed.", - "unit": "{vacuums}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.backends", - "description": "The number of backends.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "3" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.commits", - "description": "The number of commits.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "92" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.db_size", - "description": "The database disk usage.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "7297560" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.rollbacks", - "description": "The number of rollbacks.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.table.count", - "description": "Number of user tables in a database.", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "2" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - } - ] - } - ] - }, - { - "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": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "8192" - } - ] - } - } - ] - } - ] - }, - { - "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": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "8192" - } - ] - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "public.test1" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.blocks_read", - "description": "The number of blocks read.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.operations", - "description": "The number of db row operations.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.rows", - "description": "The number of rows in the database.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.size", - "description": "Disk space used by a table.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.vacuum.count", - "description": "Number of times a table has manually been vacuumed.", - "unit": "{vacuums}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "public.test2" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.blocks_read", - "description": "The number of blocks read.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "1" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "1" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "4" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "2" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.operations", - "description": "The number of db row operations.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "1" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.rows", - "description": "The number of rows in the database.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "1" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.size", - "description": "Disk space used by a table.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "8192" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.table.vacuum.count", - "description": "Number of times a table has manually been vacuumed.", - "unit": "{vacuums}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.commits", - "description": "The number of commits.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "24" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.db_size", - "description": "The database disk usage.", - "unit": "By", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "7338520" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - }, - { - "name": "postgresql.rollbacks", - "description": "The number of rollbacks.", - "unit": "1", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.table.count", - "description": "Number of user tables in a database.", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "2" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "test1" - } - }, - { - "key": "postgresql.index.name", - "value": { - "stringValue": "test1_pkey" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "8192" - } - ] - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "test2" - } - }, - { - "key": "postgresql.index.name", - "value": { - "stringValue": "test2_pkey" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "16384" - } - ] - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "test1" - } - }, - { - "key": "postgresql.index.name", - "value": { - "stringValue": "otelindex" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "8192" - } - ] - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [ - { - "key": "postgresql.database.name", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "postgresql.table.name", - "value": { - "stringValue": "test2" - } - }, - { - "key": "postgresql.index.name", - "value": { - "stringValue": "otel2index" - } - } - ] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.index.scans", - "description": "The number of index scans on a table.", - "unit": "{scans}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.index.size", - "description": "The size of the index on disk.", - "unit": "By", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "16384" - } - ] - } - } - ] - } - ] - }, - { - "resource": { - "attributes": [] - }, - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "name": "postgresql.bgwriter.buffers.allocated", - "description": "Number of buffers allocated.", - "unit": "{buffers}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "971" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.bgwriter.buffers.writes", - "description": "Number of buffers written.", - "unit": "{buffers}", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "bgwriter" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "0" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "backend" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "5" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "checkpoints" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "60" - }, - { - "attributes": [ - { - "key": "source", - "value": { - "stringValue": "backend_fsync" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.bgwriter.checkpoint.count", - "description": "The number of checkpoints performed.", - "unit": "{checkpoints}", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "type", - "value": { - "stringValue": "requested" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "4" - }, - { - "attributes": [ - { - "key": "type", - "value": { - "stringValue": "scheduled" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.bgwriter.duration", - "description": "Total time spent writing and syncing files to disk by checkpoints.", - "unit": "ms", - "sum": { - "dataPoints": [ - { - "attributes": [ - { - "key": "type", - "value": { - "stringValue": "sync" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "26" - }, - { - "attributes": [ - { - "key": "type", - "value": { - "stringValue": "write" - } - } - ], - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "14" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.bgwriter.maxwritten", - "description": "Number of times the background writer stopped a cleaning scan because it had written too many buffers.", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660573578330028000", - "timeUnixNano": "1660573588342903000", - "asInt": "0" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "isMonotonic": true - } - }, - { - "name": "postgresql.connection.max", - "description": "Configured maximum number of client connections allowed", - "unit": "{connections}", - "gauge": { - "dataPoints": [ - { - "startTimeUnixNano": "1660756211061376000", - "timeUnixNano": "1660756221071500000", - "asInt": "100" - } - ] - } - }, - { - "name": "postgresql.database.count", - "description": "Number of user databases.", - "unit": "{databases}", - "sum": { - "dataPoints": [ - { - "startTimeUnixNano": "1660316052295621000", - "timeUnixNano": "1660316062307872000", - "asInt": "3" - } - ], - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" - } - } - ] - } - ] - } - ] -} diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_all_without_resource_attributes.json b/receiver/postgresqlreceiver/testdata/integration/expected_all_without_resource_attributes.json new file mode 100644 index 000000000000..826ce70b74c8 --- /dev/null +++ b/receiver/postgresqlreceiver/testdata/integration/expected_all_without_resource_attributes.json @@ -0,0 +1,1621 @@ +{ + "resourceMetrics": [ + { + "resource": {}, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.backends", + "description": "The number of backends.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "3" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "2" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "toast_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "postgres" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "13" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "128" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "29" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "postgres" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "7232024" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "7289368" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "7330328" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "postgres" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "9" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table2" + } + }, + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.table1" + } + }, + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test1" + } + }, + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "table", + "value": { + "stringValue": "public.test2" + } + }, + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047803481310000", + "timeUnixNano": "1662047813493913000", + "asInt": "1" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.json b/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.json index a01a4535eac3..2cf451a7775c 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.json +++ b/receiver/postgresqlreceiver/testdata/integration/expected_multi_db.json @@ -1,1519 +1,1873 @@ { - "resourceMetrics": [ - { - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "description": "The number of blocks read.", - "name": "postgresql.blocks_read", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of commits.", - "name": "postgresql.commits", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "236", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "71", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The database disk usage.", - "name": "postgresql.db_size", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "8766243", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "8766243", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ] - }, - "unit": "By" - }, - { - "description": "The number of backends.", - "name": "postgresql.backends", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "1", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of rows in the database.", - "name": "postgresql.rows", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of db row operations.", - "name": "postgresql.operations", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.test1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of rollbacks.", - "name": "postgresql.rollbacks", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658846405180000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel2" - } - } - ], - "timeUnixNano": "1643658846405180000" - } - ], - "isMonotonic": true - }, - "unit": "1" - } - ] - } - ], - "resource": {} - } - ] -} + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table1" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.backends", + "description": "The number of backends.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "3" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "35" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "7297560" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.test1" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.test2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "2" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "1" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "8192" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "9" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "7338520" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test1" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "otelindex" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test2" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "otel2index" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "16384" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test1" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "test1_pkey" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel2" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "test2" + } + }, + { + "key": "postgresql.index.name", + "value": { + "stringValue": "test2_pkey" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "16384" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.bgwriter.buffers.allocated", + "description": "Number of buffers allocated.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "547" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.buffers.writes", + "description": "Number of buffers written.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "bgwriter" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "5" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "checkpoints" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "60" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend_fsync" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.checkpoint.count", + "description": "The number of checkpoints performed.", + "unit": "{checkpoints}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "requested" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "scheduled" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.duration", + "description": "Total time spent writing and syncing files to disk by checkpoints.", + "unit": "ms", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "sync" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "43" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "write" + } + } + ], + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "26" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.maxwritten", + "description": "Number of times the background writer stopped a cleaning scan because it had written too many buffers.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.connection.max", + "description": "Configured maximum number of client connections allowed", + "unit": "{connections}", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "100" + } + ] + } + }, + { + "name": "postgresql.database.count", + "description": "Number of user databases.", + "unit": "{databases}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047102751953000", + "timeUnixNano": "1662047112751911000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/receiver/postgresqlreceiver/testdata/integration/expected_single_db.json b/receiver/postgresqlreceiver/testdata/integration/expected_single_db.json index 99e45481064d..2dcf531ce27b 100644 --- a/receiver/postgresqlreceiver/testdata/integration/expected_single_db.json +++ b/receiver/postgresqlreceiver/testdata/integration/expected_single_db.json @@ -1,811 +1,988 @@ { - "resourceMetrics": [ - { - "scopeMetrics": [ - { - "scope": { - "name": "otelcol/postgresqlreceiver", - "version": "latest" - }, - "metrics": [ - { - "description": "The number of blocks read.", - "name": "postgresql.blocks_read", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "toast_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "tidx_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "heap_hit" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "source", - "value": { - "stringValue": "idx_read" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of commits.", - "name": "postgresql.commits", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "222", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The database disk usage.", - "name": "postgresql.db_size", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "8766243", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ] - }, - "unit": "By" - }, - { - "description": "The number of backends.", - "name": "postgresql.backends", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "1", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of rows in the database.", - "name": "postgresql.rows", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "live" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "state", - "value": { - "stringValue": "dead" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ] - }, - "unit": "1" - }, - { - "description": "The number of db row operations.", - "name": "postgresql.operations", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table2" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "ins" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "upd" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "del" - } - } - ], - "timeUnixNano": "1643658835383163000" - }, - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - }, - { - "key": "table", - "value": { - "stringValue": "public.table1" - } - }, - { - "key": "operation", - "value": { - "stringValue": "hot_upd" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ], - "isMonotonic": true - }, - "unit": "1" - }, - { - "description": "The number of rollbacks.", - "name": "postgresql.rollbacks", - "sum": { - "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", - "dataPoints": [ - { - "asInt": "0", - "attributes": [ - { - "key": "database", - "value": { - "stringValue": "otel" - } - } - ], - "timeUnixNano": "1643658835383163000" - } - ], - "isMonotonic": true - }, - "unit": "1" - } - ] - } - ], - "resource": {} - } - ] -} + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table2" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + }, + { + "key": "postgresql.table.name", + "value": { + "stringValue": "public.table1" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.blocks_read", + "description": "The number of blocks read.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "heap_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "idx_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "toast_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_read" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "tidx_hit" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.operations", + "description": "The number of db row operations.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "ins" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "del" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "upd" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "hot_upd" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.rows", + "description": "The number of rows in the database.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "dead" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "live" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.size", + "description": "Disk space used by a table.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.table.vacuum.count", + "description": "Number of times a table has manually been vacuumed.", + "unit": "{vacuums}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "postgresql.database.name", + "value": { + "stringValue": "otel" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.backends", + "description": "The number of backends.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "3" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.commits", + "description": "The number of commits.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "9" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.db_size", + "description": "The database disk usage.", + "unit": "By", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "7297560" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "postgresql.rollbacks", + "description": "The number of rollbacks.", + "unit": "1", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.table.count", + "description": "Number of user tables in a database.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "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": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.index.scans", + "description": "The number of index scans on a table.", + "unit": "{scans}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.index.size", + "description": "The size of the index on disk.", + "unit": "By", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "8192" + } + ] + } + } + ] + } + ] + }, + { + "resource": { + "attributes": [] + }, + "scopeMetrics": [ + { + "scope": { + "name": "otelcol/postgresqlreceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "postgresql.bgwriter.buffers.allocated", + "description": "Number of buffers allocated.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "289" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.buffers.writes", + "description": "Number of buffers written.", + "unit": "{buffers}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "bgwriter" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "5" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "checkpoints" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "60" + }, + { + "attributes": [ + { + "key": "source", + "value": { + "stringValue": "backend_fsync" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.checkpoint.count", + "description": "The number of checkpoints performed.", + "unit": "{checkpoints}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "requested" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "4" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "scheduled" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.duration", + "description": "Total time spent writing and syncing files to disk by checkpoints.", + "unit": "ms", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "sync" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "43" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "write" + } + } + ], + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "26" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.bgwriter.maxwritten", + "description": "Number of times the background writer stopped a cleaning scan because it had written too many buffers.", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "postgresql.connection.max", + "description": "Configured maximum number of client connections allowed", + "unit": "{connections}", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "100" + } + ] + } + }, + { + "name": "postgresql.database.count", + "description": "Number of user databases.", + "unit": "{databases}", + "sum": { + "dataPoints": [ + { + "startTimeUnixNano": "1662047091745118000", + "timeUnixNano": "1662047101748746000", + "asInt": "1" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/unreleased/postgres-resource-attributes-default.yaml b/unreleased/postgres-resource-attributes-default.yaml new file mode 100755 index 000000000000..e908a6b26aaf --- /dev/null +++ b/unreleased/postgres-resource-attributes-default.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: postgresqlreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: The receiver will now emit resource attributes via default. + +# One or more tracking issues related to the change +issues: [13811] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + old behavior can be established by setting the featuregates `receiver.postgresql.emitMetricsWithResourceAttributes` to false and `receiver.postgresql.emitMetricsWithoutResourceAttributes` to true