From a93f167a7a18b12241735226fb5fdbe7975014db Mon Sep 17 00:00:00 2001 From: justinsb Date: Sun, 2 Jun 2024 18:15:55 +0000 Subject: [PATCH] chore: update test data Update the scenario data to match the transition of LoggingLogMetric to direct actuation. --- .../value_type/label/_http00.log | 167 ++------------ .../value_type/label/_http01.log | 44 +++- .../labels_value_type/_http00.log | 85 ++++++- .../labels_value_type/_http01.log | 216 +----------------- .../metric_kind_and_value_type/_http00.log | 85 ++++++- .../metric_kind_and_value_type/_http01.log | 59 ++++- .../fields/llm_lazy_reconcile/_http00.log | 42 +++- .../fields/llm_lazy_reconcile/_http01.log | 40 +++- .../fields/llm_set_unset/basic/_http00.log | 137 +---------- .../fields/llm_set_unset/basic/_http01.log | 89 +------- .../fields/llm_set_unset/basic/_http02.log | 25 +- .../metric_descriptor/_http00.log | 154 +------------ .../metric_descriptor/_http01.log | 142 +----------- .../metric_descriptor/_http02.log | 69 +++--- .../fields/mutable_but_unreadable/_http00.log | 192 ++-------------- .../fields/mutable_but_unreadable/_http01.log | 45 ++++ 16 files changed, 464 insertions(+), 1127 deletions(-) create mode 100644 tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http01.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http00.log index dc9802c30f..068ada0e68 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http00.log @@ -1,70 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 404 Not Found Cache-Control: private @@ -80,23 +15,16 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", + "message": "Metric logginglogmetric-${uniqueId} does not exist.", "status": "NOT_FOUND" } } --- -POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json +POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -172,9 +100,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -221,20 +148,9 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -255,61 +171,11 @@ X-Xss-Protection: 0 "labels": [ { "description": "a label description", - "key": "testkey" - } - ], - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, - "metricDescriptor": { - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey" + "key": "testkey", + "valueType": "STRING" } ], "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -317,12 +183,6 @@ X-Xss-Protection: 0 "valueExtractor": "EXTRACT(jsonPayload.response)" } ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 @@ -368,9 +228,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http01.log index a440f5cf4c..c88781087c 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_custom_diff/value_type/label/_http01.log @@ -1,6 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -47,9 +46,39 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "labelExtractors": { + "testkey": "EXTRACT(jsonPayload.request)" + }, + "metricDescriptor": { + "displayName": "a concise name", + "labels": [ + { + "description": "a label description", + "key": "testkey" + } + ], + "metricKind": "DELTA", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} 200 OK Cache-Control: private @@ -96,9 +125,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http00.log index aba424ea07..654de7f322 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http00.log @@ -1,7 +1,30 @@ +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Metric logginglogmetric-${uniqueId} does not exist.", + "status": "NOT_FOUND" + } +} + +--- + POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "bucketOptions": { @@ -32,7 +55,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "a concise name", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -43,7 +65,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=1606 Vary: Origin Vary: X-Origin Vary: Referer @@ -81,7 +102,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -90,13 +110,11 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=77 Vary: Origin Vary: X-Origin Vary: Referer @@ -134,7 +152,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -144,7 +161,6 @@ X-Xss-Protection: 0 PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "bucketOptions": { @@ -176,7 +192,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "a concise name", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -188,7 +203,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=962 Vary: Origin Vary: X-Origin Vary: Referer @@ -226,7 +240,56 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "a description", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "labelExtractors": { + "testkey": "EXTRACT(jsonPayload.request)" + }, + "metricDescriptor": { + "description": "a description", + "displayName": "a concise name", + "labels": [ + { + "description": "a label description", + "key": "testkey" + } + ], + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } \ No newline at end of file diff --git a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http01.log index f94aed309b..c2ee696d6e 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/labels_value_type/_http01.log @@ -1,12 +1,10 @@ GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=89 Vary: Origin Vary: X-Origin Vary: Referer @@ -44,7 +42,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -54,7 +51,6 @@ X-Xss-Protection: 0 PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "bucketOptions": { @@ -66,7 +62,7 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 } }, "createTime": "2024-04-01T12:34:56.123456Z", - "description": "an updated description", + "description": "a description", "filter": "resource.type=gae_app AND severity\u003c=ERROR", "labelExtractors": { "testkey": "EXTRACT(jsonPayload.request)" @@ -86,7 +82,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "a concise name", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -94,51 +89,10 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "valueExtractor": "EXTRACT(jsonPayload.response)" } -400 Bad Request -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Server-Timing: gfet4t7; dur=360 -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.rpc.DebugInfo", - "detail": "[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \"Cannot change value type of label: testkey\" }" - } - ], - "errors": [ - { - "debugInfo": "detail: \"[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \\\"Cannot change value type of label: testkey\\\" }\"\n", - "domain": "global", - "message": "Cannot change value type of label: testkey", - "reason": "badRequest" - } - ], - "message": "Cannot change value type of label: testkey", - "status": "INVALID_ARGUMENT" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false -User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 - 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=73 Vary: Origin Vary: X-Origin Vary: Referer @@ -167,7 +121,8 @@ X-Xss-Protection: 0 "labels": [ { "description": "a label description", - "key": "testkey" + "key": "testkey", + "valueType": "INT64" } ], "metricKind": "DELTA", @@ -176,101 +131,19 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } --- -PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false -Content-Type: application/json -User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "an updated description", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, - "metricDescriptor": { - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey", - "valueType": "INT64" - } - ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, - "metricKind": "DELTA", - "name": "a concise name", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - -400 Bad Request -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Server-Timing: gfet4t7; dur=322 -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.rpc.DebugInfo", - "detail": "[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \"Cannot change value type of label: testkey\" }" - } - ], - "errors": [ - { - "debugInfo": "detail: \"[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \\\"Cannot change value type of label: testkey\\\" }\"\n", - "domain": "global", - "message": "Cannot change value type of label: testkey", - "reason": "badRequest" - } - ], - "message": "Cannot change value type of label: testkey", - "status": "INVALID_ARGUMENT" - } -} - ---- - GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=89 Vary: Origin Vary: X-Origin Vary: Referer @@ -295,47 +168,6 @@ X-Xss-Protection: 0 }, "metricDescriptor": { "description": "a description", - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey" - } - ], - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false -Content-Type: application/json -User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "description": "an updated description", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, - "metricDescriptor": { "displayName": "a concise name", "labels": [ { @@ -344,50 +176,12 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "valueType": "INT64" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", - "name": "a concise name", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" -} - -400 Bad Request -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Server-Timing: gfet4t7; dur=375 -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.rpc.DebugInfo", - "detail": "[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \"Cannot change value type of label: testkey\" }" - } - ], - "errors": [ - { - "debugInfo": "detail: \"[ORIGINAL ERROR] generic::invalid_argument: Cannot change value type of label: testkey [google.rpc.error_details_ext] { message: \\\"Cannot change value type of label: testkey\\\" }\"\n", - "domain": "global", - "message": "Cannot change value type of label: testkey", - "reason": "badRequest" - } - ], - "message": "Cannot change value type of label: testkey", - "status": "INVALID_ARGUMENT" - } } \ No newline at end of file diff --git a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http00.log index 4045039039..654de7f322 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http00.log @@ -1,7 +1,30 @@ +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Metric logginglogmetric-${uniqueId} does not exist.", + "status": "NOT_FOUND" + } +} + +--- + POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "bucketOptions": { @@ -32,7 +55,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "a concise name", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -43,7 +65,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=1514 Vary: Origin Vary: X-Origin Vary: Referer @@ -81,7 +102,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -90,13 +110,11 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=95 Vary: Origin Vary: X-Origin Vary: Referer @@ -134,7 +152,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -144,7 +161,6 @@ X-Xss-Protection: 0 PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 { "bucketOptions": { @@ -176,7 +192,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "a concise name", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -188,7 +203,6 @@ X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=1088 Vary: Origin Vary: X-Origin Vary: Referer @@ -226,7 +240,56 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "a description", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "labelExtractors": { + "testkey": "EXTRACT(jsonPayload.request)" + }, + "metricDescriptor": { + "description": "a description", + "displayName": "a concise name", + "labels": [ + { + "description": "a label description", + "key": "testkey" + } + ], + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } \ No newline at end of file diff --git a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http01.log index 62fcb5a9e2..a8531605c0 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_immutable_field/metric_kind_and_value_type/_http01.log @@ -1,12 +1,10 @@ GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=90 Vary: Origin Vary: X-Origin Vary: Referer @@ -44,7 +42,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -53,13 +50,11 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=77 Vary: Origin Vary: X-Origin Vary: Referer @@ -97,7 +92,6 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -106,13 +100,11 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.1 gdcl/0.160.0 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 Server: ESF -Server-Timing: gfet4t7; dur=83 Vary: Origin Vary: X-Origin Vary: Referer @@ -150,7 +142,56 @@ X-Xss-Protection: 0 "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", - "resourceName": "projects/${projectId}/metrics/logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "description": "a description", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "labelExtractors": { + "testkey": "EXTRACT(jsonPayload.request)" + }, + "metricDescriptor": { + "description": "a description", + "displayName": "a concise name", + "labels": [ + { + "description": "a label description", + "key": "testkey" + } + ], + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } \ No newline at end of file diff --git a/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http00.log index 1f03d0519c..fe5ed6b5d4 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http00.log @@ -1,6 +1,5 @@ GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 404 Not Found Cache-Control: private @@ -26,7 +25,6 @@ X-Xss-Protection: 0 POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 { "bucketOptions": { @@ -83,7 +81,6 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 200 OK Cache-Control: private @@ -123,7 +120,6 @@ X-Xss-Protection: 0 PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 { "bucketOptions": { @@ -156,6 +152,44 @@ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 2.5, + 5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003e=ERROR", + "metricDescriptor": { + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/lazyreconcile-${uniqueId}", + "type": "logging.googleapis.com/user/lazyreconcile-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "lazyreconcile-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + { "bucketOptions": { "explicitBuckets": { diff --git a/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http01.log index c2d7398652..8cd55876c5 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_lazy_reconcile/_http01.log @@ -1,6 +1,5 @@ GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 200 OK Cache-Control: private @@ -39,7 +38,44 @@ X-Xss-Protection: 0 GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false User-Agent: google-api-go-client/0.5 -X-Goog-Api-Client: gl-go/1.22.3 gdcl/0.177.0 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 2.5, + 5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003e=ERROR", + "metricDescriptor": { + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/lazyreconcile-${uniqueId}", + "type": "logging.googleapis.com/user/lazyreconcile-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "lazyreconcile-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} + +--- + +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/lazyreconcile-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log index ea0c106f7a..3cb21a4bc8 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log @@ -1,70 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 404 Not Found Cache-Control: private @@ -80,23 +15,16 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", + "message": "Metric logginglogmetric-${uniqueId} does not exist.", "status": "NOT_FOUND" } } --- -POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json +POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 { "filter": "resource.type=gae_app AND severity\u003c=ERROR", @@ -123,33 +51,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -171,20 +74,9 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "createTime": "2024-04-01T12:34:56.123456Z", @@ -193,12 +85,6 @@ X-Xss-Protection: 0 "updateTime": "2024-04-01T12:34:56.123456Z" } ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 @@ -219,9 +105,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log index 5ef4759278..1eeebad84f 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log @@ -1,54 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -70,38 +21,17 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z" -} - ---- - -PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -{ "description": "an e2e test", "disabled": true, - "filter": "resource.type=gae_app AND severity\u003c=INFO" + "filter": "resource.type=gae_app AND severity\u003c=INFO", + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" } 200 OK @@ -126,9 +56,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log index d7afb9ac40..c0add3fcc1 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log @@ -1,6 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -24,9 +23,16 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 + +{ + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003c=INFO", + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z" +} 200 OK Cache-Control: private @@ -41,8 +47,6 @@ X-Xss-Protection: 0 { "createTime": "2024-04-01T12:34:56.123456Z", - "description": "an e2e test", - "disabled": true, "filter": "resource.type=gae_app AND severity\u003c=INFO", "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z" @@ -50,9 +54,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -67,8 +70,6 @@ X-Xss-Protection: 0 { "createTime": "2024-04-01T12:34:56.123456Z", - "description": "an e2e test", - "disabled": true, "filter": "resource.type=gae_app AND severity\u003c=INFO", "name": "logginglogmetric-${uniqueId}", "updateTime": "2024-04-01T12:34:56.123456Z" diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log index 25a6e09f35..264cb11ba5 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log @@ -1,6 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 404 Not Found Cache-Control: private @@ -16,87 +15,16 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", + "message": "Metric logginglogmetric-${uniqueId} does not exist.", "status": "NOT_FOUND" } } --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -151,9 +79,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -190,59 +117,9 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "metricDescriptor": { - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -257,8 +134,6 @@ X-Xss-Protection: 0 "filter": "resource.type=gae_app AND severity\u003c=ERROR", "metricDescriptor": { "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -266,12 +141,6 @@ X-Xss-Protection: 0 "valueExtractor": "EXTRACT(jsonPayload.response)" } ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 @@ -307,9 +176,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log index fc0dc4a6fb..36be47a74e 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log @@ -1,84 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "metricDescriptor": { - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "metricDescriptor": { - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -115,20 +36,9 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -141,33 +51,6 @@ X-Xss-Protection: 0 }, "createTime": "2024-04-01T12:34:56.123456Z", "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "metricDescriptor": { - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "filter": "resource.type=gae_app AND severity\u003c=ERROR", "labelExtractors": { "testkey": "EXTRACT(jsonPayload.request)" }, @@ -188,6 +71,8 @@ User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 "metricKind": "DELTA", "valueType": "DISTRIBUTION" }, + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", "valueExtractor": "EXTRACT(jsonPayload.response)" } @@ -224,11 +109,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -241,9 +121,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -278,11 +157,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log index 68eab6f76a..84662c4ad9 100644 --- a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log +++ b/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log @@ -1,6 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -35,11 +34,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -52,9 +46,29 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "metricDescriptor": { + "metricKind": "DELTA", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} 200 OK Cache-Control: private @@ -78,22 +92,7 @@ X-Xss-Protection: 0 }, "createTime": "2024-04-01T12:34:56.123456Z", "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, "metricDescriptor": { - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey" - } - ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -106,9 +105,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -132,22 +130,7 @@ X-Xss-Protection: 0 }, "createTime": "2024-04-01T12:34:56.123456Z", "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, "metricDescriptor": { - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey" - } - ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", diff --git a/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http00.log b/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http00.log index f2a1590805..d48d9c6b49 100644 --- a/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http00.log +++ b/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http00.log @@ -1,70 +1,5 @@ -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -404 Not Found -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "error": { - "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "status": "NOT_FOUND" - } -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 404 Not Found Cache-Control: private @@ -80,23 +15,16 @@ X-Xss-Protection: 0 { "error": { "code": 404, - "errors": [ - { - "domain": "global", - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", - "reason": "notFound" - } - ], - "message": "logMetric \"projects/${projectId}/metrics/logginglogmetric-${uniqueId}\" not found", + "message": "Metric logginglogmetric-${uniqueId} does not exist.", "status": "NOT_FOUND" } } --- -POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json +POST https://logging.googleapis.com/v2/projects/${projectId}/metrics?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -165,65 +93,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, - "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "valueType": "DISTRIBUTION" - }, - "name": "logginglogmetric-${uniqueId}", - "updateTime": "2024-04-01T12:34:56.123456Z", - "valueExtractor": "EXTRACT(jsonPayload.response)" -} - ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "bucketOptions": { - "explicitBuckets": { - "bounds": [ - 1.5, - 4.5 - ] - } - }, - "createTime": "2024-04-01T12:34:56.123456Z", - "filter": "resource.type=gae_app AND severity\u003c=ERROR", - "labelExtractors": { - "testkey": "EXTRACT(jsonPayload.request)" - }, - "metricDescriptor": { - "displayName": "a concise name", - "labels": [ - { - "description": "a label description", - "key": "testkey" - } - ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -236,9 +105,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -273,11 +141,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -290,20 +153,9 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json +PUT https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 +User-Agent: google-api-go-client/0.5 { "bucketOptions": { @@ -324,7 +176,8 @@ X-Xss-Protection: 0 "labels": [ { "description": "a label description", - "key": "testkey" + "key": "testkey", + "valueType": "STRING" } ], "launchStage": "EARLY_ACCESS", @@ -333,8 +186,6 @@ X-Xss-Protection: 0 "samplePeriod": "1s" }, "metricKind": "DELTA", - "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", - "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", "valueType": "DISTRIBUTION" }, "name": "logginglogmetric-${uniqueId}", @@ -342,12 +193,6 @@ X-Xss-Protection: 0 "valueExtractor": "EXTRACT(jsonPayload.response)" } ---- - -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 - 200 OK Cache-Control: private Content-Type: application/json; charset=UTF-8 @@ -381,11 +226,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", @@ -398,9 +238,8 @@ X-Xss-Protection: 0 --- -GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json -Content-Type: application/json -User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 200 OK Cache-Control: private @@ -435,11 +274,6 @@ X-Xss-Protection: 0 "key": "testkey" } ], - "launchStage": "EARLY_ACCESS", - "metadata": { - "ingestDelay": "1s", - "samplePeriod": "1s" - }, "metricKind": "DELTA", "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", diff --git a/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http01.log b/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http01.log new file mode 100644 index 0000000000..edc0758ab4 --- /dev/null +++ b/tests/e2e/testdata/scenarios/fields/mutable_but_unreadable/_http01.log @@ -0,0 +1,45 @@ +GET https://logging.googleapis.com/v2/projects/${projectId}/metrics/logginglogmetric-${uniqueId}?alt=json&prettyPrint=false +User-Agent: google-api-go-client/0.5 + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "bucketOptions": { + "explicitBuckets": { + "bounds": [ + 1.5, + 4.5 + ] + } + }, + "createTime": "2024-04-01T12:34:56.123456Z", + "filter": "resource.type=gae_app AND severity\u003c=ERROR", + "labelExtractors": { + "testkey": "EXTRACT(jsonPayload.request)" + }, + "metricDescriptor": { + "displayName": "a concise name", + "labels": [ + { + "description": "a label description", + "key": "testkey" + } + ], + "metricKind": "DELTA", + "name": "projects/${projectId}/metricDescriptors/logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "type": "logging.googleapis.com/user/logginglogmetric-${uniqueId}", + "valueType": "DISTRIBUTION" + }, + "name": "logginglogmetric-${uniqueId}", + "updateTime": "2024-04-01T12:34:56.123456Z", + "valueExtractor": "EXTRACT(jsonPayload.response)" +} \ No newline at end of file