From f1cef2116a8cf2294cab2c0aa2434a7cbd58db32 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 18 Jul 2023 14:36:19 +0000 Subject: [PATCH] remove duplicate SOSD test that was failing on integration test --- .../testcases/testcases_metrics.go | 12 +- .../metrics/histogram_sosd_expect.json | 774 ------------------ 2 files changed, 1 insertion(+), 785 deletions(-) delete mode 100644 exporter/collector/integrationtest/testdata/fixtures/metrics/histogram_sosd_expect.json diff --git a/exporter/collector/integrationtest/testcases/testcases_metrics.go b/exporter/collector/integrationtest/testcases/testcases_metrics.go index 188874563..7e5cd9b48 100644 --- a/exporter/collector/integrationtest/testcases/testcases_metrics.go +++ b/exporter/collector/integrationtest/testcases/testcases_metrics.go @@ -101,6 +101,7 @@ var MetricsTestCases = []TestCase{ Name: "Histogram", OTLPInputFixturePath: "testdata/fixtures/metrics/histogram.json", ExpectFixturePath: "testdata/fixtures/metrics/histogram_expect.json", + // TODO(dashpole): implement sum of squared deviation in the SDK exporter and enable here. ConfigureCollector: func(cfg *collector.Config) { cfg.MetricConfig.ServiceResourceLabels = false cfg.MetricConfig.InstrumentationLibraryLabels = true @@ -131,17 +132,6 @@ var MetricsTestCases = []TestCase{ SkipForSDK: true, }, // Tests with special configuration options - { - Name: "Histogram with SumOfSquaredDeviation", - OTLPInputFixturePath: "testdata/fixtures/metrics/histogram.json", - ExpectFixturePath: "testdata/fixtures/metrics/histogram_sosd_expect.json", - ConfigureCollector: func(cfg *collector.Config) { - cfg.MetricConfig.ServiceResourceLabels = false - cfg.MetricConfig.InstrumentationLibraryLabels = true - cfg.MetricConfig.EnableSumOfSquaredDeviation = true - }, - SkipForSDK: true, - }, { Name: "Project not found return code", OTLPInputFixturePath: "testdata/fixtures/metrics/counter.json", diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics/histogram_sosd_expect.json b/exporter/collector/integrationtest/testdata/fixtures/metrics/histogram_sosd_expect.json deleted file mode 100644 index 2a6c5f609..000000000 --- a/exporter/collector/integrationtest/testdata/fixtures/metrics/histogram_sosd_expect.json +++ /dev/null @@ -1,774 +0,0 @@ -{ - "createTimeSeriesRequests": [ - { - "name": "projects/fakeprojectid", - "timeSeries": [ - { - "metric": { - "type": "workload.googleapis.com/simple.histogram", - "labels": { - "some_lemons": "13" - } - }, - "resource": { - "type": "generic_task", - "labels": { - "job": "demo", - "location": "us-central1-c", - "namespace": "", - "task_id": "10.92.5.2:15692" - } - }, - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "count": "1", - "mean": 2, - "sumOfSquaredDeviation": 2.25, - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1, - 2, - 5, - 10, - 20, - 50 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "1", - "0", - "0", - "0", - "0" - ] - } - } - } - ], - "unit": "s" - }, - { - "metric": { - "type": "workload.googleapis.com/simple.histogram", - "labels": { - "some_lemons": "10" - } - }, - "resource": { - "type": "generic_task", - "labels": { - "job": "demo", - "location": "us-central1-c", - "namespace": "", - "task_id": "10.92.5.2:15692" - } - }, - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "count": "2", - "mean": 7, - "sumOfSquaredDeviation": 76.25, - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1, - 2, - 5, - 10, - 20, - 50 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "1", - "0", - "1", - "0", - "0" - ] - } - } - } - ], - "unit": "s" - } - ] - } - ], - "createMetricDescriptorRequests": [ - { - "name": "projects/fakeprojectid", - "metricDescriptor": { - "name": "simple.histogram", - "type": "workload.googleapis.com/simple.histogram", - "labels": [ - { - "key": "some_lemons" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "unit": "s", - "displayName": "simple.histogram" - } - } - ], - "selfObservabilityMetrics": { - "createTimeSeriesRequests": [ - { - "name": "projects/myproject", - "timeSeries": [ - { - "metric": { - "type": "custom.googleapis.com/opencensus/googlecloudmonitoring/point_count", - "labels": { - "status": "OK" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "int64Value": "2" - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/completed_rpcs", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateMetricDescriptor", - "grpc_client_status": "OK" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "int64Value": "1" - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/completed_rpcs", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateTimeSeries", - "grpc_client_status": "OK" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "int64Value": "1" - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/received_bytes_per_rpc", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateMetricDescriptor" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 1024, - 2048, - 4096, - 16384, - 65536, - 262144, - 1048576, - 4194304, - 16777216, - 67108864, - 268435456, - 1073741824, - 4294967296 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/received_bytes_per_rpc", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateTimeSeries" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 1024, - 2048, - 4096, - 16384, - 65536, - 262144, - 1048576, - 4194304, - 16777216, - 67108864, - 268435456, - 1073741824, - 4294967296 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/roundtrip_latency", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateMetricDescriptor" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 0.01, - 0.05, - 0.1, - 0.3, - 0.6, - 0.8, - 1, - 2, - 3, - 4, - 5, - 6, - 8, - 10, - 13, - 16, - 20, - 25, - 30, - 40, - 50, - 65, - 80, - 100, - 130, - 160, - 200, - 250, - 300, - 400, - 500, - 650, - 800, - 1000, - 2000, - 5000, - 10000, - 20000, - 50000, - 100000 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/roundtrip_latency", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateTimeSeries" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 0.01, - 0.05, - 0.1, - 0.3, - 0.6, - 0.8, - 1, - 2, - 3, - 4, - 5, - 6, - 8, - 10, - 13, - 16, - 20, - 25, - 30, - 40, - 50, - 65, - 80, - 100, - 130, - 160, - 200, - 250, - 300, - 400, - 500, - 650, - 800, - 1000, - 2000, - 5000, - 10000, - 20000, - 50000, - 100000 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/sent_bytes_per_rpc", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateMetricDescriptor" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 1024, - 2048, - 4096, - 16384, - 65536, - 262144, - 1048576, - 4194304, - 16777216, - 67108864, - 268435456, - 1073741824, - 4294967296 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - }, - { - "metric": { - "type": "custom.googleapis.com/opencensus/grpc.io/client/sent_bytes_per_rpc", - "labels": { - "grpc_client_method": "google.monitoring.v3.MetricService/CreateTimeSeries" - } - }, - "resource": { - "type": "global" - }, - "points": [ - { - "interval": { - "endTime": "1970-01-01T00:00:00Z", - "startTime": "1970-01-01T00:00:00Z" - }, - "value": { - "distributionValue": { - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 0, - 1024, - 2048, - 4096, - 16384, - 65536, - 262144, - 1048576, - 4194304, - 16777216, - 67108864, - 268435456, - 1073741824, - 4294967296 - ] - } - }, - "bucketCounts": [ - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0", - "0" - ] - } - } - } - ] - } - ] - } - ], - "createMetricDescriptorRequests": [ - { - "name": "projects/myproject", - "metricDescriptor": { - "name": "projects/myproject/metricDescriptors/custom.googleapis.com/opencensus/googlecloudmonitoring/point_count", - "type": "custom.googleapis.com/opencensus/googlecloudmonitoring/point_count", - "labels": [ - { - "key": "status" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "INT64", - "unit": "1", - "description": "Count of metric points written to Cloud Monitoring.", - "displayName": "OpenCensus/googlecloudmonitoring/point_count" - } - }, - { - "name": "projects/myproject", - "metricDescriptor": { - "name": "projects/myproject/metricDescriptors/custom.googleapis.com/opencensus/grpc.io/client/completed_rpcs", - "type": "custom.googleapis.com/opencensus/grpc.io/client/completed_rpcs", - "labels": [ - { - "key": "grpc_client_method" - }, - { - "key": "grpc_client_status" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "INT64", - "unit": "1", - "description": "Count of RPCs by method and status.", - "displayName": "OpenCensus/grpc.io/client/completed_rpcs" - } - }, - { - "name": "projects/myproject", - "metricDescriptor": { - "name": "projects/myproject/metricDescriptors/custom.googleapis.com/opencensus/grpc.io/client/received_bytes_per_rpc", - "type": "custom.googleapis.com/opencensus/grpc.io/client/received_bytes_per_rpc", - "labels": [ - { - "key": "grpc_client_method" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "unit": "By", - "description": "Distribution of bytes received per RPC, by method.", - "displayName": "OpenCensus/grpc.io/client/received_bytes_per_rpc" - } - }, - { - "name": "projects/myproject", - "metricDescriptor": { - "name": "projects/myproject/metricDescriptors/custom.googleapis.com/opencensus/grpc.io/client/roundtrip_latency", - "type": "custom.googleapis.com/opencensus/grpc.io/client/roundtrip_latency", - "labels": [ - { - "key": "grpc_client_method" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "unit": "ms", - "description": "Distribution of round-trip latency, by method.", - "displayName": "OpenCensus/grpc.io/client/roundtrip_latency" - } - }, - { - "name": "projects/myproject", - "metricDescriptor": { - "name": "projects/myproject/metricDescriptors/custom.googleapis.com/opencensus/grpc.io/client/sent_bytes_per_rpc", - "type": "custom.googleapis.com/opencensus/grpc.io/client/sent_bytes_per_rpc", - "labels": [ - { - "key": "grpc_client_method" - } - ], - "metricKind": "CUMULATIVE", - "valueType": "DISTRIBUTION", - "unit": "By", - "description": "Distribution of bytes sent per RPC, by method.", - "displayName": "OpenCensus/grpc.io/client/sent_bytes_per_rpc" - } - } - ] - } -}