From d71313e6ca1fbbf713708d4fe54463d87317c0a4 Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 15:51:27 +0000 Subject: [PATCH 01/11] created golden files --- .../config.yaml | 1 + .../input.log | 8 ++ .../output_fluentbit.yaml | 134 ++++++++++++++++++ .../output_otel.yaml | 77 ++++++++++ .../config.yaml | 1 + .../input.log | 6 + .../output_fluentbit.yaml | 134 ++++++++++++++++++ .../output_otel.yaml | 77 ++++++++++ .../config.yaml | 1 + .../input.log | 8 ++ .../output_fluentbit.yaml | 134 ++++++++++++++++++ .../output_otel.yaml | 77 ++++++++++ 12 files changed, 658 insertions(+) create mode 100644 transformation_test/testdata/logging_processor-couchbase-general/config.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-general/input.log create mode 100644 transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-goxcdr/config.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log create mode 100644 transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-http-access/config.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-http-access/input.log create mode 100644 transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml create mode 100644 transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml diff --git a/transformation_test/testdata/logging_processor-couchbase-general/config.yaml b/transformation_test/testdata/logging_processor-couchbase-general/config.yaml new file mode 100644 index 0000000000..3692c2992c --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-general/config.yaml @@ -0,0 +1 @@ +- type: couchbase_general diff --git a/transformation_test/testdata/logging_processor-couchbase-general/input.log b/transformation_test/testdata/logging_processor-couchbase-general/input.log new file mode 100644 index 0000000000..96ca98fcad --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-general/input.log @@ -0,0 +1,8 @@ +[ns_server:info,2025-08-18T09:15:12.123Z,ns_1@127.0.0.1:0000:menelaus_web]Bucket 'travel-data' created with 3 replicas +[ns_server:warn,2025-08-18T09:16:05.452Z,ns_1@127.0.0.1:0000:index_updater]Index build taking longer than expected on bucket 'travel-data' +[ns_server:error,2025-08-18T09:16:33.764Z,ns_1@127.0.0.1:0000:bucket_engine]Failed to allocate memory for vbuckets: insufficient quota +[ns_server:debug,2025-08-18T09:16:55.987Z,ns_1@127.0.0.1:0000:rebalance]Rebalance progress: 45% completed +Continuation line giving rebalance details +Still continuing additional rebalance logs with memory usage stats... +[ns_server:info,2025-08-18T09:17:30.333Z,ns_1@127.0.0.1:0000:cluster_manager]Node 'ns_1@127.0.0.1' added to cluster +[ns_server:error,2025-08-18T09:18:00.741Z,ns_1@127.0.0.1:0000:ssl_certificate]SSL handshake failed: certificate expired \ No newline at end of file diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml new file mode 100644 index 0000000000..79cc61787d --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml @@ -0,0 +1,134 @@ +- entries: + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: GET + requestSize: 0.0 + requestUrl: http://localhost:8080/test + responseSize: 273.0 + serverIp: "" + status: 404.0 + userAgent: curl/7.64.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-02T15:55:05.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/login + remoteIp: 192.168.1.10 + requestMethod: POST + requestSize: 0.0 + requestUrl: /api/v1/login + responseSize: 512.0 + serverIp: "" + status: 200.0 + userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + jsonPayload: + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-03T10:12:45.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/2.0 + referer: "" + remoteIp: 10.0.0.5 + requestMethod: GET + requestSize: 0.0 + requestUrl: /static/image.png + responseSize: 0.0 + serverIp: "" + status: 304.0 + userAgent: curl/7.68.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-04T08:30:12.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/profile + remoteIp: 203.0.113.42 + requestMethod: PUT + requestSize: 0.0 + requestUrl: /user/profile + responseSize: 128.0 + serverIp: "" + status: 401.0 + userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + jsonPayload: + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-05T22:01:59.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: DELETE + requestSize: 0.0 + requestUrl: /api/v1/item/123 + responseSize: 0.0 + serverIp: "" + status: 204.0 + userAgent: PostmanRuntime/7.28.4 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-06T14:23:11.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/ + remoteIp: 172.16.0.2 + requestMethod: GET + requestSize: 0.0 + requestUrl: /dashboard + responseSize: 1024.0 + serverIp: "" + status: 500.0 + userAgent: Mozilla/5.0 (X11; Linux x86_64) + jsonPayload: + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-07T19:45:33.000000000Z + partialSuccess: true + resource: + labels: {} + type: gce_instance diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml new file mode 100644 index 0000000000..9aceb70286 --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml @@ -0,0 +1,77 @@ +- entries: + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-02T15:55:05Z + - jsonPayload: + gzip_ratio: "" + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-03T10:12:45Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-04T08:30:12Z + - jsonPayload: + gzip_ratio: "" + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-05T22:01:59Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-06T14:23:11Z + - jsonPayload: + gzip_ratio: "" + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-07T19:45:33Z + partialSuccess: true diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/config.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/config.yaml new file mode 100644 index 0000000000..868ced49b1 --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/config.yaml @@ -0,0 +1 @@ +- type: couchbase_goxdcr diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log new file mode 100644 index 0000000000..1d760857fb --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log @@ -0,0 +1,6 @@ +192.168.1.10 couchbase.local - [18/Aug/2025:09:20:11 +0000] "GET /pools/default/buckets/travel-data HTTP/1.1" 200 512 "-" "curl/7.68.0" Request took 5ms +192.168.1.12 couchbase.local - [18/Aug/2025:09:20:42 +0000] "POST /pools/default/buckets/travel-data/docs HTTP/1.1" 201 123 "-" "python-requests/2.26.0" Request took 12ms +192.168.1.13 couchbase.local - [18/Aug/2025:09:21:10 +0000] "GET /pools/default/buckets/missing-data HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" Request took 2ms +192.168.1.14 couchbase.local - [18/Aug/2025:09:21:25 +0000] "PUT /pools/default/buckets/travel-data/docs/user:123 HTTP/1.1" 500 64 "-" "node-fetch/1.0" Request took 18ms +192.168.1.15 couchbase.local - [18/Aug/2025:09:22:00 +0000] "DELETE /pools/default/buckets/old-data HTTP/1.1" 403 64 "-" "curl/7.88.1" Request took 7ms +192.168.1.16 couchbase.local - [18/Aug/2025:09:22:35 +0000] "GET /pools/default/buckets/travel-data/docs?include_docs=true HTTP/1.1" 302 0 http://referrer.example.com "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36" Request took 3ms \ No newline at end of file diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml new file mode 100644 index 0000000000..79cc61787d --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml @@ -0,0 +1,134 @@ +- entries: + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: GET + requestSize: 0.0 + requestUrl: http://localhost:8080/test + responseSize: 273.0 + serverIp: "" + status: 404.0 + userAgent: curl/7.64.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-02T15:55:05.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/login + remoteIp: 192.168.1.10 + requestMethod: POST + requestSize: 0.0 + requestUrl: /api/v1/login + responseSize: 512.0 + serverIp: "" + status: 200.0 + userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + jsonPayload: + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-03T10:12:45.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/2.0 + referer: "" + remoteIp: 10.0.0.5 + requestMethod: GET + requestSize: 0.0 + requestUrl: /static/image.png + responseSize: 0.0 + serverIp: "" + status: 304.0 + userAgent: curl/7.68.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-04T08:30:12.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/profile + remoteIp: 203.0.113.42 + requestMethod: PUT + requestSize: 0.0 + requestUrl: /user/profile + responseSize: 128.0 + serverIp: "" + status: 401.0 + userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + jsonPayload: + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-05T22:01:59.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: DELETE + requestSize: 0.0 + requestUrl: /api/v1/item/123 + responseSize: 0.0 + serverIp: "" + status: 204.0 + userAgent: PostmanRuntime/7.28.4 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-06T14:23:11.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/ + remoteIp: 172.16.0.2 + requestMethod: GET + requestSize: 0.0 + requestUrl: /dashboard + responseSize: 1024.0 + serverIp: "" + status: 500.0 + userAgent: Mozilla/5.0 (X11; Linux x86_64) + jsonPayload: + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-07T19:45:33.000000000Z + partialSuccess: true + resource: + labels: {} + type: gce_instance diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml new file mode 100644 index 0000000000..9aceb70286 --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml @@ -0,0 +1,77 @@ +- entries: + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-02T15:55:05Z + - jsonPayload: + gzip_ratio: "" + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-03T10:12:45Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-04T08:30:12Z + - jsonPayload: + gzip_ratio: "" + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-05T22:01:59Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-06T14:23:11Z + - jsonPayload: + gzip_ratio: "" + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-07T19:45:33Z + partialSuccess: true diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/config.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/config.yaml new file mode 100644 index 0000000000..713c80708c --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/config.yaml @@ -0,0 +1 @@ +- type: couchbase_http_access diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/input.log b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log new file mode 100644 index 0000000000..3a5ee4f7b3 --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log @@ -0,0 +1,8 @@ +2025-08-18T09:23:02.452Z INFO PipelineManager: Starting replication pipeline for bucket 'travel-data' +2025-08-18T09:23:10.874Z WARN XDCR.CheckpointService: Failed to save checkpoint due to timeout +2025-08-18T09:23:22.345Z ERROR Router: Failed to route mutation for key "user:12345", retrying... +Document size exceeded configured threshold +Additional line providing stack trace details +2025-08-18T09:23:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102 +2025-08-18T09:24:00.998Z INFO PipelineManager: Replication pipeline stopped successfully +2025-08-18T09:24:20.451Z ERROR XDCR.Filter: Invalid filter expression encountered, skipping document \ No newline at end of file diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml new file mode 100644 index 0000000000..79cc61787d --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml @@ -0,0 +1,134 @@ +- entries: + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: GET + requestSize: 0.0 + requestUrl: http://localhost:8080/test + responseSize: 273.0 + serverIp: "" + status: 404.0 + userAgent: curl/7.64.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-02T15:55:05.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/login + remoteIp: 192.168.1.10 + requestMethod: POST + requestSize: 0.0 + requestUrl: /api/v1/login + responseSize: 512.0 + serverIp: "" + status: 200.0 + userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + jsonPayload: + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-03T10:12:45.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/2.0 + referer: "" + remoteIp: 10.0.0.5 + requestMethod: GET + requestSize: 0.0 + requestUrl: /static/image.png + responseSize: 0.0 + serverIp: "" + status: 304.0 + userAgent: curl/7.68.0 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-04T08:30:12.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/profile + remoteIp: 203.0.113.42 + requestMethod: PUT + requestSize: 0.0 + requestUrl: /user/profile + responseSize: 128.0 + serverIp: "" + status: 401.0 + userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + jsonPayload: + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-05T22:01:59.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 127.0.0.1 + requestMethod: DELETE + requestSize: 0.0 + requestUrl: /api/v1/item/123 + responseSize: 0.0 + serverIp: "" + status: 204.0 + userAgent: PostmanRuntime/7.28.4 + jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-06T14:23:11.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: https://example.com/ + remoteIp: 172.16.0.2 + requestMethod: GET + requestSize: 0.0 + requestUrl: /dashboard + responseSize: 1024.0 + serverIp: "" + status: 500.0 + userAgent: Mozilla/5.0 (X11; Linux x86_64) + jsonPayload: + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/transformation_test + timestamp: 2022-03-07T19:45:33.000000000Z + partialSuccess: true + resource: + labels: {} + type: gce_instance diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml new file mode 100644 index 0000000000..9aceb70286 --- /dev/null +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml @@ -0,0 +1,77 @@ +- entries: + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-02T15:55:05Z + - jsonPayload: + gzip_ratio: "" + user: john + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-03T10:12:45Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-04T08:30:12Z + - jsonPayload: + gzip_ratio: "" + user: alice + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-05T22:01:59Z + - jsonPayload: + gzip_ratio: "" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-06T14:23:11Z + - jsonPayload: + gzip_ratio: "" + user: bob + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2022-03-07T19:45:33Z + partialSuccess: true From 14eb829d711a08c36679a37d54240f8605e8ef39 Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 18:02:14 +0000 Subject: [PATCH 02/11] initial implementation --- apps/couchbase.go | 227 +++++++++--------- .../output_fluentbit.yaml | 153 +++--------- .../output_otel.yaml | 78 +----- .../output_fluentbit.yaml | 134 ++--------- .../output_otel.yaml | 78 +----- .../output_fluentbit.yaml | 147 +++++++----- .../output_otel.yaml | 56 ++--- 7 files changed, 286 insertions(+), 587 deletions(-) diff --git a/apps/couchbase.go b/apps/couchbase.go index 6e26c36a57..62d3236f5a 100644 --- a/apps/couchbase.go +++ b/apps/couchbase.go @@ -20,7 +20,6 @@ import ( "sort" "github.com/GoogleCloudPlatform/ops-agent/confgenerator" - "github.com/GoogleCloudPlatform/ops-agent/confgenerator/fluentbit" "github.com/GoogleCloudPlatform/ops-agent/confgenerator/otel" "github.com/GoogleCloudPlatform/ops-agent/internal/secret" ) @@ -239,56 +238,40 @@ func init() { confgenerator.MetricsReceiverTypes.RegisterType(func() confgenerator.MetricsReceiver { return &MetricsReceiverCouchbase{} }) } -// LoggingReceiverCouchbase is a struct used for generating the fluentbit component for couchbase logs -type LoggingReceiverCouchbase struct { - confgenerator.ConfigComponent `yaml:",inline"` - ReceiverMixin confgenerator.LoggingReceiverFilesMixin `yaml:",inline" validate:"structonly"` -} +type LoggingProcessorMacroCouchbase struct{} // Type returns the string identifier for the general couchbase logs -func (lr LoggingReceiverCouchbase) Type() string { +func (p LoggingProcessorMacroCouchbase) Type() string { return "couchbase_general" } -// Components returns the logging components of the couchbase access logs -func (lr LoggingReceiverCouchbase) Components(ctx context.Context, tag string) []fluentbit.Component { - if len(lr.ReceiverMixin.IncludePaths) == 0 { - lr.ReceiverMixin.IncludePaths = []string{ - "/opt/couchbase/var/lib/couchbase/logs/couchdb.log", - "/opt/couchbase/var/lib/couchbase/logs/info.log", - "/opt/couchbase/var/lib/couchbase/logs/debug.log", - "/opt/couchbase/var/lib/couchbase/logs/error.log", - "/opt/couchbase/var/lib/couchbase/logs/babysitter.log", - } - } - components := lr.ReceiverMixin.Components(ctx, tag) - components = append(components, confgenerator.LoggingProcessorParseMultilineRegex{ - LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ - Parsers: []confgenerator.RegexParser{ - { - Regex: `^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$`, - Parser: confgenerator.ParserShared{ - TimeKey: "timestamp", - TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", +func (p LoggingProcessorMacroCouchbase) Expand(ctx context.Context) []confgenerator.InternalLoggingProcessor { + return []confgenerator.InternalLoggingProcessor{ + confgenerator.LoggingProcessorParseMultilineRegex{ + LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ + Parsers: []confgenerator.RegexParser{ + { + Regex: `^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$`, + Parser: confgenerator.ParserShared{ + TimeKey: "timestamp", + TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", + }, }, }, }, - }, - Rules: []confgenerator.MultilineRule{ - { - StateName: "start_state", - NextState: "cont", - Regex: `^\[([^\s+:]*):`, - }, - { - StateName: "cont", - NextState: "cont", - Regex: `^(?!\[([^\s+:]*):).*$`, + Rules: []confgenerator.MultilineRule{ + { + StateName: "start_state", + NextState: "cont", + Regex: `^\[([^\s+:]*):`, + }, + { + StateName: "cont", + NextState: "cont", + Regex: `^(?!\[([^\s+:]*):).*$`, + }, }, }, - }.Components(ctx, tag, lr.Type())...) - - components = append(components, confgenerator.LoggingProcessorModifyFields{ Fields: map[string]*confgenerator.ModifyField{ "severity": { @@ -301,53 +284,40 @@ func (lr LoggingReceiverCouchbase) Components(ctx context.Context, tag string) [ }, MapValuesExclusive: true, }, - InstrumentationSourceLabel: instrumentationSourceValue(lr.Type()), + InstrumentationSourceLabel: instrumentationSourceValue(p.Type()), }, - }.Components(ctx, tag, lr.Type())...) - return components + }, + } } -// LoggingProcessorCouchbaseHTTPAccess is a struct that will generate the fluentbit components for the http access logs -type LoggingProcessorCouchbaseHTTPAccess struct { - confgenerator.ConfigComponent `yaml:",inline"` - ReceiverMixin confgenerator.LoggingReceiverFilesMixin `yaml:",inline" validate:"structonly"` +// Components returns the logging components of the couchbase access logs +func loggingReceiverFilesMixinCouchbase() confgenerator.LoggingReceiverFilesMixin { + return confgenerator.LoggingReceiverFilesMixin{ + IncludePaths: []string{ + "/opt/couchbase/var/lib/couchbase/logs/couchdb.log", + "/opt/couchbase/var/lib/couchbase/logs/info.log", + "/opt/couchbase/var/lib/couchbase/logs/debug.log", + "/opt/couchbase/var/lib/couchbase/logs/error.log", + "/opt/couchbase/var/lib/couchbase/logs/babysitter.log", + }, + } } +// LoggingProcessorCouchbaseHTTPAccess is a struct that will generate the fluentbit components for the http access logs +type LoggingProcessorMacroCouchbaseHTTPAccess struct{} + // Type returns the string for the couchbase http access logs -func (lp LoggingProcessorCouchbaseHTTPAccess) Type() string { +func (p LoggingProcessorMacroCouchbaseHTTPAccess) Type() string { return "couchbase_http_access" } // Components returns the fluentbit components for the http access logs of couchbase -func (lp LoggingProcessorCouchbaseHTTPAccess) Components(ctx context.Context, tag string) []fluentbit.Component { - if len(lp.ReceiverMixin.IncludePaths) == 0 { - lp.ReceiverMixin.IncludePaths = []string{ - "/opt/couchbase/var/lib/couchbase/logs/http_access.log", - "/opt/couchbase/var/lib/couchbase/logs/http_access_internal.log", - } - } - c := lp.ReceiverMixin.Components(ctx, tag) - // TODO: Harden the genericAccessLogParser so it can be used. It didn't work here since there are some minor differences with the - // referer fields and there are additional fields after the user agent here but not in the other apps. - c = append(c, - confgenerator.LoggingProcessorParseRegex{ - Regex: `^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$`, - ParserShared: confgenerator.ParserShared{ - TimeKey: "timestamp", - TimeFormat: `%d/%b/%Y:%H:%M:%S %z`, - Types: map[string]string{ - "size": "integer", - "code": "integer", - }, - }, - }.Components(ctx, tag, lp.Type())..., - ) +func (p LoggingProcessorMacroCouchbaseHTTPAccess) Expand(ctx context.Context) []confgenerator.InternalLoggingProcessor { mf := confgenerator.LoggingProcessorModifyFields{ Fields: map[string]*confgenerator.ModifyField{ - InstrumentationSourceLabel: instrumentationSourceValue(lp.Type()), + InstrumentationSourceLabel: instrumentationSourceValue(p.Type()), }, } - // Generate the httpRequest structure. for _, field := range []string{ "remoteIp", "requestMethod", @@ -367,56 +337,78 @@ func (lp LoggingProcessorCouchbaseHTTPAccess) Components(ctx context.Context, ta mf.Fields[dest].OmitIf = fmt.Sprintf(`%s = "-"`, src) } } - c = append(c, mf.Components(ctx, tag, lp.Type())...) - return c + + return []confgenerator.InternalLoggingProcessor{ + // TODO: Harden the genericAccessLogParser so it can be used. It didn't work here since there are some minor differences with the + // referer fields and there are additional fields after the user agent here but not in the other apps. + confgenerator.LoggingProcessorParseRegex{ + Regex: `^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$`, + ParserShared: confgenerator.ParserShared{ + TimeKey: "timestamp", + TimeFormat: `%d/%b/%Y:%H:%M:%S %z`, + Types: map[string]string{ + "size": "integer", + "code": "integer", + }, + }, + }, + confgenerator.LoggingProcessorModifyFields{ + Fields: map[string]*confgenerator.ModifyField{ + InstrumentationSourceLabel: instrumentationSourceValue(p.Type()), + }, + }, + mf, + } +} + +func loggingReceiverFilesMixinCouchbaseHTTPAccess() confgenerator.LoggingReceiverFilesMixin { + return confgenerator.LoggingReceiverFilesMixin{ + IncludePaths: []string{ + "/opt/couchbase/var/lib/couchbase/logs/http_access.log", + "/opt/couchbase/var/lib/couchbase/logs/http_access_internal.log", + }, + } } // LoggingProcessorCouchbaseGOXDCR is a struct that iwll generate the fluentbit components for the goxdcr logs -type LoggingProcessorCouchbaseGOXDCR struct { +type LoggingProcessorMacroCouchbaseGOXDCR struct { confgenerator.ConfigComponent `yaml:",inline"` ReceiverMixin confgenerator.LoggingReceiverFilesMixin `yaml:",inline" validate:"structonly"` } // Type returns the type string for the cross datacenter logs of couchbase -func (lg LoggingProcessorCouchbaseGOXDCR) Type() string { +func (p LoggingProcessorMacroCouchbaseGOXDCR) Type() string { return "couchbase_goxdcr" } // Components returns the fluentbit components for the couchbase goxdcr logs -func (lg LoggingProcessorCouchbaseGOXDCR) Components(ctx context.Context, tag string) []fluentbit.Component { - if len(lg.ReceiverMixin.IncludePaths) == 0 { - lg.ReceiverMixin.IncludePaths = []string{ - "/opt/couchbase/var/lib/couchbase/logs/goxdcr.log", - } - } - - c := lg.ReceiverMixin.Components(ctx, tag) - c = append(c, confgenerator.LoggingProcessorParseMultilineRegex{ - LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ - Parsers: []confgenerator.RegexParser{ - { - Regex: `^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$`, - Parser: confgenerator.ParserShared{ - TimeKey: "timestamp", - TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", +func (p LoggingProcessorMacroCouchbaseGOXDCR) Expand(ctx context.Context) []confgenerator.InternalLoggingProcessor { + return []confgenerator.InternalLoggingProcessor{ + confgenerator.LoggingProcessorParseMultilineRegex{ + LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ + Parsers: []confgenerator.RegexParser{ + { + Regex: `^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$`, + Parser: confgenerator.ParserShared{ + TimeKey: "timestamp", + TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", + }, }, }, }, - }, - Rules: []confgenerator.MultilineRule{ - { - StateName: "start_state", - NextState: "cont", - Regex: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}`, - }, - { - StateName: "cont", - NextState: "cont", - Regex: `^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})`, + Rules: []confgenerator.MultilineRule{ + { + StateName: "start_state", + NextState: "cont", + Regex: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}`, + }, + { + StateName: "cont", + NextState: "cont", + Regex: `^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})`, + }, }, }, - }.Components(ctx, tag, lg.Type())...) - c = append(c, confgenerator.LoggingProcessorModifyFields{ Fields: map[string]*confgenerator.ModifyField{ "severity": { @@ -429,15 +421,22 @@ func (lg LoggingProcessorCouchbaseGOXDCR) Components(ctx context.Context, tag st }, MapValuesExclusive: true, }, - InstrumentationSourceLabel: instrumentationSourceValue(lg.Type()), + InstrumentationSourceLabel: instrumentationSourceValue(p.Type()), }, - }.Components(ctx, tag, lg.Type())..., - ) - return c + }, + } +} + +func loggingReceiverFilesMixinCouchbaseGOXDCR() confgenerator.LoggingReceiverFilesMixin { + return confgenerator.LoggingReceiverFilesMixin{ + IncludePaths: []string{ + "/opt/couchbase/var/lib/couchbase/logs/goxdcr.log", + }, + } } func init() { - confgenerator.LoggingReceiverTypes.RegisterType(func() confgenerator.LoggingReceiver { return &LoggingReceiverCouchbase{} }) - confgenerator.LoggingReceiverTypes.RegisterType(func() confgenerator.LoggingReceiver { return &LoggingProcessorCouchbaseHTTPAccess{} }) - confgenerator.LoggingReceiverTypes.RegisterType(func() confgenerator.LoggingReceiver { return &LoggingProcessorCouchbaseGOXDCR{} }) + confgenerator.RegisterLoggingFilesProcessorMacro[LoggingProcessorMacroCouchbase](loggingReceiverFilesMixinCouchbase) + confgenerator.RegisterLoggingFilesProcessorMacro[LoggingProcessorMacroCouchbaseHTTPAccess](loggingReceiverFilesMixinCouchbaseHTTPAccess) + confgenerator.RegisterLoggingFilesProcessorMacro[LoggingProcessorMacroCouchbaseGOXDCR](loggingReceiverFilesMixinCouchbaseGOXDCR) } diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml index 79cc61787d..0b5db622bf 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml @@ -1,133 +1,52 @@ - entries: - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: "" - remoteIp: 127.0.0.1 - requestMethod: GET - requestSize: 0.0 - requestUrl: http://localhost:8080/test - responseSize: 273.0 - serverIp: "" - status: 404.0 - userAgent: curl/7.64.0 - jsonPayload: {} + - jsonPayload: + level: info + message: Bucket 'travel-data' created with 3 replicas + node_name: ns_1@127.0.0.1 + source: menelaus_web + type: ns_server labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-02T15:55:05.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/login - remoteIp: 192.168.1.10 - requestMethod: POST - requestSize: 0.0 - requestUrl: /api/v1/login - responseSize: 512.0 - serverIp: "" - status: 200.0 - userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) - jsonPayload: - user: john + severity: 200.0 + timestamp: 2025-08-18T09:15:12.123000000Z + - jsonPayload: + level: warn + message: Index build taking longer than expected on bucket 'travel-data' + node_name: ns_1@127.0.0.1 + source: index_updater + type: ns_server labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-03T10:12:45.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/2.0 - referer: "" - remoteIp: 10.0.0.5 - requestMethod: GET - requestSize: 0.0 - requestUrl: /static/image.png - responseSize: 0.0 - serverIp: "" - status: 304.0 - userAgent: curl/7.68.0 - jsonPayload: {} + severity: 400.0 + timestamp: 2025-08-18T09:16:05.452000000Z + - jsonPayload: + level: error + message: "Failed to allocate memory for vbuckets: insufficient quota" + node_name: ns_1@127.0.0.1 + source: bucket_engine + type: ns_server labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-04T08:30:12.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/profile - remoteIp: 203.0.113.42 - requestMethod: PUT - requestSize: 0.0 - requestUrl: /user/profile - responseSize: 128.0 - serverIp: "" - status: 401.0 - userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) - jsonPayload: - user: alice + severity: 500.0 + timestamp: 2025-08-18T09:16:33.764000000Z + - jsonPayload: + level: debug + message: "Rebalance progress: 45% completed" + node_name: ns_1@127.0.0.1 + source: rebalance + type: ns_server labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-05T22:01:59.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: "" - remoteIp: 127.0.0.1 - requestMethod: DELETE - requestSize: 0.0 - requestUrl: /api/v1/item/123 - responseSize: 0.0 - serverIp: "" - status: 204.0 - userAgent: PostmanRuntime/7.28.4 - jsonPayload: {} - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-06T14:23:11.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/ - remoteIp: 172.16.0.2 - requestMethod: GET - requestSize: 0.0 - requestUrl: /dashboard - responseSize: 1024.0 - serverIp: "" - status: 500.0 - userAgent: Mozilla/5.0 (X11; Linux x86_64) - jsonPayload: - user: bob - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-07T19:45:33.000000000Z + severity: 100.0 + timestamp: 2025-08-18T09:16:55.987000000Z partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml index 9aceb70286..c83821d3ed 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml @@ -1,77 +1 @@ -- entries: - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-02T15:55:05Z - - jsonPayload: - gzip_ratio: "" - user: john - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-03T10:12:45Z - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-04T08:30:12Z - - jsonPayload: - gzip_ratio: "" - user: alice - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-05T22:01:59Z - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-06T14:23:11Z - - jsonPayload: - gzip_ratio: "" - user: bob - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-07T19:45:33Z - partialSuccess: true +- config_error: "processor \"processor0\" has invalid configuration: unimplemented" diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml index 79cc61787d..9ce00b505c 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml @@ -1,133 +1,39 @@ - entries: - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: "" - remoteIp: 127.0.0.1 - requestMethod: GET - requestSize: 0.0 - requestUrl: http://localhost:8080/test - responseSize: 273.0 - serverIp: "" - status: 404.0 - userAgent: curl/7.64.0 - jsonPayload: {} + - jsonPayload: + message: 192.168.1.10 couchbase.local - [18/Aug/2025:09:20:11 +0000] "GET /pools/default/buckets/travel-data HTTP/1.1" 200 512 "-" "curl/7.68.0" Request took 5ms labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-02T15:55:05.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/login - remoteIp: 192.168.1.10 - requestMethod: POST - requestSize: 0.0 - requestUrl: /api/v1/login - responseSize: 512.0 - serverIp: "" - status: 200.0 - userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) - jsonPayload: - user: john + timestamp: now + - jsonPayload: + message: 192.168.1.12 couchbase.local - [18/Aug/2025:09:20:42 +0000] "POST /pools/default/buckets/travel-data/docs HTTP/1.1" 201 123 "-" "python-requests/2.26.0" Request took 12ms labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-03T10:12:45.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/2.0 - referer: "" - remoteIp: 10.0.0.5 - requestMethod: GET - requestSize: 0.0 - requestUrl: /static/image.png - responseSize: 0.0 - serverIp: "" - status: 304.0 - userAgent: curl/7.68.0 - jsonPayload: {} + timestamp: now + - jsonPayload: + message: 192.168.1.13 couchbase.local - [18/Aug/2025:09:21:10 +0000] "GET /pools/default/buckets/missing-data HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" Request took 2ms labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-04T08:30:12.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/profile - remoteIp: 203.0.113.42 - requestMethod: PUT - requestSize: 0.0 - requestUrl: /user/profile - responseSize: 128.0 - serverIp: "" - status: 401.0 - userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) - jsonPayload: - user: alice + timestamp: now + - jsonPayload: + message: 192.168.1.14 couchbase.local - [18/Aug/2025:09:21:25 +0000] "PUT /pools/default/buckets/travel-data/docs/user:123 HTTP/1.1" 500 64 "-" "node-fetch/1.0" Request took 18ms labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-05T22:01:59.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: "" - remoteIp: 127.0.0.1 - requestMethod: DELETE - requestSize: 0.0 - requestUrl: /api/v1/item/123 - responseSize: 0.0 - serverIp: "" - status: 204.0 - userAgent: PostmanRuntime/7.28.4 - jsonPayload: {} + timestamp: now + - jsonPayload: + message: 192.168.1.15 couchbase.local - [18/Aug/2025:09:22:00 +0000] "DELETE /pools/default/buckets/old-data HTTP/1.1" 403 64 "-" "curl/7.88.1" Request took 7ms labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-06T14:23:11.000000000Z - - httpRequest: - cacheFillBytes: 0.0 - cacheHit: false - cacheLookup: false - cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/ - remoteIp: 172.16.0.2 - requestMethod: GET - requestSize: 0.0 - requestUrl: /dashboard - responseSize: 1024.0 - serverIp: "" - status: 500.0 - userAgent: Mozilla/5.0 (X11; Linux x86_64) - jsonPayload: - user: bob - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-07T19:45:33.000000000Z + timestamp: now partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml index 9aceb70286..c83821d3ed 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml @@ -1,77 +1 @@ -- entries: - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-02T15:55:05Z - - jsonPayload: - gzip_ratio: "" - user: john - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-03T10:12:45Z - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-04T08:30:12Z - - jsonPayload: - gzip_ratio: "" - user: alice - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-05T22:01:59Z - - jsonPayload: - gzip_ratio: "" - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-06T14:23:11Z - - jsonPayload: - gzip_ratio: "" - user: bob - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2022-03-07T19:45:33Z - partialSuccess: true +- config_error: "processor \"processor0\" has invalid configuration: unimplemented" diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml index 79cc61787d..fa55cea3a8 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml @@ -4,130 +4,155 @@ cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 + protocol: "" referer: "" - remoteIp: 127.0.0.1 - requestMethod: GET + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: http://localhost:8080/test - responseSize: 273.0 + requestUrl: "" + responseSize: 0.0 serverIp: "" - status: 404.0 - userAgent: curl/7.64.0 - jsonPayload: {} + status: 0.0 + userAgent: "" + jsonPayload: + message: "2025-08-18T09:23:02.452Z INFO PipelineManager: Starting replication pipeline for bucket 'travel-data'" labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-02T15:55:05.000000000Z + timestamp: now - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/login - remoteIp: 192.168.1.10 - requestMethod: POST + protocol: "" + referer: "" + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: /api/v1/login - responseSize: 512.0 + requestUrl: "" + responseSize: 0.0 serverIp: "" - status: 200.0 - userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + status: 0.0 + userAgent: "" jsonPayload: - user: john + message: "2025-08-18T09:23:10.874Z WARN XDCR.CheckpointService: Failed to save checkpoint due to timeout" labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-03T10:12:45.000000000Z + timestamp: now - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/2.0 + protocol: "" referer: "" - remoteIp: 10.0.0.5 - requestMethod: GET + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: /static/image.png + requestUrl: "" responseSize: 0.0 serverIp: "" - status: 304.0 - userAgent: curl/7.68.0 - jsonPayload: {} + status: 0.0 + userAgent: "" + jsonPayload: + message: "2025-08-18T09:23:22.345Z ERROR Router: Failed to route mutation for key \"user:12345\", retrying..." labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-04T08:30:12.000000000Z + timestamp: now - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/profile - remoteIp: 203.0.113.42 - requestMethod: PUT + protocol: "" + referer: "" + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: /user/profile - responseSize: 128.0 + requestUrl: "" + responseSize: 0.0 serverIp: "" - status: 401.0 - userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + status: 0.0 + userAgent: "" jsonPayload: - user: alice + message: Document size exceeded configured threshold labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-05T22:01:59.000000000Z + timestamp: now - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 + protocol: "" referer: "" - remoteIp: 127.0.0.1 - requestMethod: DELETE + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: /api/v1/item/123 + requestUrl: "" responseSize: 0.0 serverIp: "" - status: 204.0 - userAgent: PostmanRuntime/7.28.4 - jsonPayload: {} + status: 0.0 + userAgent: "" + jsonPayload: + message: Additional line providing stack trace details labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-06T14:23:11.000000000Z + timestamp: now - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: HTTP/1.1 - referer: https://example.com/ - remoteIp: 172.16.0.2 - requestMethod: GET + protocol: "" + referer: "" + remoteIp: "" + requestMethod: "" requestSize: 0.0 - requestUrl: /dashboard - responseSize: 1024.0 + requestUrl: "" + responseSize: 0.0 + serverIp: "" + status: 0.0 + userAgent: "" + jsonPayload: + message: "2025-08-18T09:23:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102" + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/transformation_test + timestamp: now + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: "" + referer: "" + remoteIp: "" + requestMethod: "" + requestSize: 0.0 + requestUrl: "" + responseSize: 0.0 serverIp: "" - status: 500.0 - userAgent: Mozilla/5.0 (X11; Linux x86_64) + status: 0.0 + userAgent: "" jsonPayload: - user: bob + message: "2025-08-18T09:24:00.998Z INFO PipelineManager: Replication pipeline stopped successfully" labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: 2022-03-07T19:45:33.000000000Z + timestamp: now partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml index 9aceb70286..be67969851 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml @@ -1,77 +1,79 @@ - entries: - - jsonPayload: - gzip_ratio: "" + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-02T15:55:05Z - - jsonPayload: - gzip_ratio: "" - user: john + timestamp: now + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-03T10:12:45Z - - jsonPayload: - gzip_ratio: "" + timestamp: now + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-04T08:30:12Z - - jsonPayload: - gzip_ratio: "" - user: alice + timestamp: now + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-05T22:01:59Z - - jsonPayload: - gzip_ratio: "" + timestamp: now + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-06T14:23:11Z - - jsonPayload: - gzip_ratio: "" - user: bob + timestamp: now + - jsonPayload: {} labels: compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/varnish + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/my-log-name resource: labels: instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: 2022-03-07T19:45:33Z + timestamp: now + - jsonPayload: {} + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: now partialSuccess: true From 271083d12cfbf70077fa1a78288465dffa3bdd18 Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 18:09:09 +0000 Subject: [PATCH 03/11] realistic http access logs --- .../input.log | 18 +- .../output_fluentbit.yaml | 178 ++++++++++++------ .../output_otel.yaml | 145 ++++++++++++-- 3 files changed, 261 insertions(+), 80 deletions(-) diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/input.log b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log index 3a5ee4f7b3..274620bbf7 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/input.log +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log @@ -1,8 +1,10 @@ -2025-08-18T09:23:02.452Z INFO PipelineManager: Starting replication pipeline for bucket 'travel-data' -2025-08-18T09:23:10.874Z WARN XDCR.CheckpointService: Failed to save checkpoint due to timeout -2025-08-18T09:23:22.345Z ERROR Router: Failed to route mutation for key "user:12345", retrying... -Document size exceeded configured threshold -Additional line providing stack trace details -2025-08-18T09:23:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102 -2025-08-18T09:24:00.998Z INFO PipelineManager: Replication pipeline stopped successfully -2025-08-18T09:24:20.451Z ERROR XDCR.Filter: Invalid filter expression encountered, skipping document \ No newline at end of file +192.168.1.10 couchbase.local - [18/Aug/2025:09:20:11 +0000] "GET /pools/default/buckets/travel-data HTTP/1.1" 200 512 - "curl/7.68.0" Request took 5ms +192.168.1.12 couchbase.local - [18/Aug/2025:09:20:42 +0000] "POST /pools/default/buckets/travel-data/docs HTTP/1.1" 201 123 - "python-requests/2.26.0" Request took 12ms +192.168.1.13 couchbase.local - [18/Aug/2025:09:21:10 +0000] "GET /pools/default/buckets/missing-data HTTP/1.1" 404 0 - "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" Request took 2ms +192.168.1.14 couchbase.local - [18/Aug/2025:09:21:25 +0000] "PUT /pools/default/buckets/travel-data/docs/user:123 HTTP/1.1" 500 64 - "node-fetch/1.0" Internal Server Error +192.168.1.15 couchbase.local - [18/Aug/2025:09:22:00 +0000] "DELETE /pools/default/buckets/old-data HTTP/1.1" 403 64 - "curl/7.88.1" Unauthorized delete attempt +192.168.1.16 couchbase.local - [18/Aug/2025:09:22:35 +0000] "GET /pools/default/buckets/travel-data/docs?include_docs=true HTTP/1.1" 302 0 http://referrer.example.com "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36" Redirected to login +192.168.1.17 couchbase.local - [18/Aug/2025:09:23:01 +0000] "HEAD /pools/default/buckets/travel-data/docs/user:999 HTTP/1.1" 304 0 - "Go-http-client/1.1" Not modified +192.168.1.18 couchbase.local - [18/Aug/2025:09:23:40 +0000] "OPTIONS /pools/default/buckets/travel-data HTTP/1.1" 204 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" Preflight check passed +192.168.1.19 couchbase.local - [18/Aug/2025:09:24:15 +0000] "GET /pools/default/buckets/travel-data/docs?limit=1000 HTTP/1.1" 413 0 - "curl/8.0.1" Payload too large +192.168.1.20 couchbase.local - [18/Aug/2025:09:25:00 +0000] "PATCH /pools/default/buckets/travel-data/docs/user:321 HTTP/1.1" 409 128 - "python-requests/2.31.0" Document conflict \ No newline at end of file diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml index fa55cea3a8..590c4fb3e2 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml @@ -4,155 +4,217 @@ cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.10 + requestMethod: GET requestSize: 0.0 - requestUrl: "" - responseSize: 0.0 + requestUrl: /pools/default/buckets/travel-data + responseSize: 512.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 200.0 + userAgent: curl/7.68.0 jsonPayload: - message: "2025-08-18T09:23:02.452Z INFO PipelineManager: Starting replication pipeline for bucket 'travel-data'" + host: couchbase.local + message: Request took 5ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:20:11.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.12 + requestMethod: POST requestSize: 0.0 - requestUrl: "" - responseSize: 0.0 + requestUrl: /pools/default/buckets/travel-data/docs + responseSize: 123.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 201.0 + userAgent: python-requests/2.26.0 jsonPayload: - message: "2025-08-18T09:23:10.874Z WARN XDCR.CheckpointService: Failed to save checkpoint due to timeout" + host: couchbase.local + message: Request took 12ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:20:42.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.13 + requestMethod: GET requestSize: 0.0 - requestUrl: "" + requestUrl: /pools/default/buckets/missing-data responseSize: 0.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 404.0 + userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) jsonPayload: - message: "2025-08-18T09:23:22.345Z ERROR Router: Failed to route mutation for key \"user:12345\", retrying..." + host: couchbase.local + message: Request took 2ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:21:10.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.14 + requestMethod: PUT + requestSize: 0.0 + requestUrl: /pools/default/buckets/travel-data/docs/user:123 + responseSize: 64.0 + serverIp: "" + status: 500.0 + userAgent: node-fetch/1.0 + jsonPayload: + host: couchbase.local + message: Internal Server Error + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T09:21:25.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 192.168.1.15 + requestMethod: DELETE + requestSize: 0.0 + requestUrl: /pools/default/buckets/old-data + responseSize: 64.0 + serverIp: "" + status: 403.0 + userAgent: curl/7.88.1 + jsonPayload: + host: couchbase.local + message: Unauthorized delete attempt + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T09:22:00.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: http://referrer.example.com + remoteIp: 192.168.1.16 + requestMethod: GET requestSize: 0.0 - requestUrl: "" + requestUrl: /pools/default/buckets/travel-data/docs?include_docs=true responseSize: 0.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 302.0 + userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36 jsonPayload: - message: Document size exceeded configured threshold + host: couchbase.local + message: Redirected to login + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:22:35.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.17 + requestMethod: HEAD requestSize: 0.0 - requestUrl: "" + requestUrl: /pools/default/buckets/travel-data/docs/user:999 responseSize: 0.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 304.0 + userAgent: Go-http-client/1.1 jsonPayload: - message: Additional line providing stack trace details + host: couchbase.local + message: Not modified + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:23:01.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.18 + requestMethod: OPTIONS requestSize: 0.0 - requestUrl: "" + requestUrl: /pools/default/buckets/travel-data responseSize: 0.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 204.0 + userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) jsonPayload: - message: "2025-08-18T09:23:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102" + host: couchbase.local + message: Preflight check passed + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:23:40.000000000Z - httpRequest: cacheFillBytes: 0.0 cacheHit: false cacheLookup: false cacheValidatedWithOriginServer: false - protocol: "" + protocol: HTTP/1.1 referer: "" - remoteIp: "" - requestMethod: "" + remoteIp: 192.168.1.19 + requestMethod: GET requestSize: 0.0 - requestUrl: "" + requestUrl: /pools/default/buckets/travel-data/docs?limit=1000 responseSize: 0.0 serverIp: "" - status: 0.0 - userAgent: "" + status: 413.0 + userAgent: curl/8.0.1 jsonPayload: - message: "2025-08-18T09:24:00.998Z INFO PipelineManager: Replication pipeline stopped successfully" + host: couchbase.local + message: Payload too large + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test - timestamp: now + timestamp: 2025-08-18T09:24:15.000000000Z partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml index be67969851..51fa2bdc7e 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml @@ -1,5 +1,16 @@ - entries: - - jsonPayload: {} + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.10 + requestMethod: GET + requestUrl: /pools/default/buckets/travel-data + responseSize: "512" + status: 200 + userAgent: curl/7.68.0 + jsonPayload: + host: couchbase.local + message: Request took 5ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -9,8 +20,19 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:20:11Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.12 + requestMethod: POST + requestUrl: /pools/default/buckets/travel-data/docs + responseSize: "123" + status: 201 + userAgent: python-requests/2.26.0 + jsonPayload: + host: couchbase.local + message: Request took 12ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -20,8 +42,18 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:20:42Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.13 + requestMethod: GET + requestUrl: /pools/default/buckets/missing-data + status: 404 + userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + jsonPayload: + host: couchbase.local + message: Request took 2ms + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -31,8 +63,19 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:21:10Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.14 + requestMethod: PUT + requestUrl: /pools/default/buckets/travel-data/docs/user:123 + responseSize: "64" + status: 500 + userAgent: node-fetch/1.0 + jsonPayload: + host: couchbase.local + message: Internal Server Error + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -42,8 +85,19 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:21:25Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.15 + requestMethod: DELETE + requestUrl: /pools/default/buckets/old-data + responseSize: "64" + status: 403 + userAgent: curl/7.88.1 + jsonPayload: + host: couchbase.local + message: Unauthorized delete attempt + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -53,8 +107,19 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:22:00Z + - httpRequest: + protocol: HTTP/1.1 + referer: http://referrer.example.com + remoteIp: 192.168.1.16 + requestMethod: GET + requestUrl: /pools/default/buckets/travel-data/docs?include_docs=true + status: 302 + userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36 + jsonPayload: + host: couchbase.local + message: Redirected to login + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -64,8 +129,18 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now - - jsonPayload: {} + timestamp: 2025-08-18T09:22:35Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.17 + requestMethod: HEAD + requestUrl: /pools/default/buckets/travel-data/docs/user:999 + status: 304 + userAgent: Go-http-client/1.1 + jsonPayload: + host: couchbase.local + message: Not modified + user: - labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access @@ -75,5 +150,47 @@ instance_id: test-instance-id zone: test-zone type: gce_instance - timestamp: now + timestamp: 2025-08-18T09:23:01Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.18 + requestMethod: OPTIONS + requestUrl: /pools/default/buckets/travel-data + status: 204 + userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + jsonPayload: + host: couchbase.local + message: Preflight check passed + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2025-08-18T09:23:40Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.19 + requestMethod: GET + requestUrl: /pools/default/buckets/travel-data/docs?limit=1000 + status: 413 + userAgent: curl/8.0.1 + jsonPayload: + host: couchbase.local + message: Payload too large + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2025-08-18T09:24:15Z partialSuccess: true From e88ab8e8e719edd1ebf0aa097590425d6cb648ce Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 18:15:08 +0000 Subject: [PATCH 04/11] realistic goxcdr logs --- .../input.log | 12 +++---- .../output_fluentbit.yaml | 35 ++++++++----------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log index 1d760857fb..10e30582f4 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log @@ -1,6 +1,6 @@ -192.168.1.10 couchbase.local - [18/Aug/2025:09:20:11 +0000] "GET /pools/default/buckets/travel-data HTTP/1.1" 200 512 "-" "curl/7.68.0" Request took 5ms -192.168.1.12 couchbase.local - [18/Aug/2025:09:20:42 +0000] "POST /pools/default/buckets/travel-data/docs HTTP/1.1" 201 123 "-" "python-requests/2.26.0" Request took 12ms -192.168.1.13 couchbase.local - [18/Aug/2025:09:21:10 +0000] "GET /pools/default/buckets/missing-data HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" Request took 2ms -192.168.1.14 couchbase.local - [18/Aug/2025:09:21:25 +0000] "PUT /pools/default/buckets/travel-data/docs/user:123 HTTP/1.1" 500 64 "-" "node-fetch/1.0" Request took 18ms -192.168.1.15 couchbase.local - [18/Aug/2025:09:22:00 +0000] "DELETE /pools/default/buckets/old-data HTTP/1.1" 403 64 "-" "curl/7.88.1" Request took 7ms -192.168.1.16 couchbase.local - [18/Aug/2025:09:22:35 +0000] "GET /pools/default/buckets/travel-data/docs?include_docs=true HTTP/1.1" 302 0 http://referrer.example.com "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/120.0.0.0 Safari/537.36" Request took 3ms \ No newline at end of file +2025-08-18T14:27:02.452Z INFO PipelineManager: Starting replication pipeline for bucket travel-data +2025-08-18T14:27:10.874Z WARN XDCR.CheckpointService: Failed to save checkpoint due to timeout +2025-08-18T14:27:22.345Z ERROR Router: Failed to route mutation for key "user:12345", retrying... +Additional detail: document size exceeded configured threshold +2025-08-18T14:27:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102 +2025-08-18T14:28:00.998Z INFO PipelineManager: Replication pipeline stopped successfully \ No newline at end of file diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml index 9ce00b505c..31cadeadfa 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml @@ -1,39 +1,34 @@ - entries: - jsonPayload: - message: 192.168.1.10 couchbase.local - [18/Aug/2025:09:20:11 +0000] "GET /pools/default/buckets/travel-data HTTP/1.1" 200 512 "-" "curl/7.68.0" Request took 5ms + level: INFO + log_type: PipelineManager + message: Starting replication pipeline for bucket travel-data labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: now + severity: 200.0 + timestamp: 2025-08-18T14:27:02.452000000Z - jsonPayload: - message: 192.168.1.12 couchbase.local - [18/Aug/2025:09:20:42 +0000] "POST /pools/default/buckets/travel-data/docs HTTP/1.1" 201 123 "-" "python-requests/2.26.0" Request took 12ms + level: WARN + log_type: XDCR.CheckpointService + message: Failed to save checkpoint due to timeout labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: now + severity: 400.0 + timestamp: 2025-08-18T14:27:10.874000000Z - jsonPayload: - message: 192.168.1.13 couchbase.local - [18/Aug/2025:09:21:10 +0000] "GET /pools/default/buckets/missing-data HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" Request took 2ms + level: ERROR + log_type: Router + message: Failed to route mutation for key "user:12345", retrying... labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr logName: projects/my-project/logs/transformation_test - timestamp: now - - jsonPayload: - message: 192.168.1.14 couchbase.local - [18/Aug/2025:09:21:25 +0000] "PUT /pools/default/buckets/travel-data/docs/user:123 HTTP/1.1" 500 64 "-" "node-fetch/1.0" Request took 18ms - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr - logName: projects/my-project/logs/transformation_test - timestamp: now - - jsonPayload: - message: 192.168.1.15 couchbase.local - [18/Aug/2025:09:22:00 +0000] "DELETE /pools/default/buckets/old-data HTTP/1.1" 403 64 "-" "curl/7.88.1" Request took 7ms - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr - logName: projects/my-project/logs/transformation_test - timestamp: now + severity: 500.0 + timestamp: 2025-08-18T14:27:22.345000000Z partialSuccess: true resource: labels: {} From 40e5b5cf8da318fb27b094685450bc9584d8c9dd Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 18:18:31 +0000 Subject: [PATCH 05/11] golden files update --- confgenerator/testdata/feature/golden.csv | 25 ++++++------ .../golden/linux-gpu/error | 2 +- .../golden/linux/error | 2 +- .../golden/windows-2012/error | 2 +- .../golden/windows/error | 2 +- .../golden/linux-gpu/error | 2 +- .../golden/linux/error | 2 +- .../golden/windows-2012/error | 2 +- .../golden/windows/error | 2 +- .../3bca332f661c48e682cdb7a2bdf766e8.lua | 16 ++++++++ .../70b18de0556f28eb634ccb944b2b33d0.lua | 12 ++++++ .../linux-gpu/feature_tracking_otlp.json | 2 +- .../golden/linux-gpu/features.yaml | 16 ++++++++ .../golden/linux-gpu/fluent_bit_main.conf | 40 ++++++++++++++----- .../golden/linux-gpu/fluent_bit_parser.conf | 10 ++--- .../3bca332f661c48e682cdb7a2bdf766e8.lua | 16 ++++++++ .../70b18de0556f28eb634ccb944b2b33d0.lua | 12 ++++++ .../golden/linux/feature_tracking_otlp.json | 2 +- .../golden/linux/features.yaml | 16 ++++++++ .../golden/linux/fluent_bit_main.conf | 40 ++++++++++++++----- .../golden/linux/fluent_bit_parser.conf | 10 ++--- .../3bca332f661c48e682cdb7a2bdf766e8.lua | 16 ++++++++ .../70b18de0556f28eb634ccb944b2b33d0.lua | 12 ++++++ .../windows-2012/feature_tracking_otlp.json | 2 +- .../golden/windows-2012/features.yaml | 16 ++++++++ .../golden/windows-2012/fluent_bit_main.conf | 40 ++++++++++++++----- .../windows-2012/fluent_bit_parser.conf | 10 ++--- .../3bca332f661c48e682cdb7a2bdf766e8.lua | 16 ++++++++ .../70b18de0556f28eb634ccb944b2b33d0.lua | 12 ++++++ .../golden/windows/feature_tracking_otlp.json | 2 +- .../golden/windows/features.yaml | 16 ++++++++ .../golden/windows/fluent_bit_main.conf | 40 ++++++++++++++----- .../golden/windows/fluent_bit_parser.conf | 10 ++--- 33 files changed, 337 insertions(+), 88 deletions(-) create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/3bca332f661c48e682cdb7a2bdf766e8.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/70b18de0556f28eb634ccb944b2b33d0.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/3bca332f661c48e682cdb7a2bdf766e8.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/70b18de0556f28eb634ccb944b2b33d0.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/3bca332f661c48e682cdb7a2bdf766e8.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/70b18de0556f28eb634ccb944b2b33d0.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/3bca332f661c48e682cdb7a2bdf766e8.lua create mode 100644 confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/70b18de0556f28eb634ccb944b2b33d0.lua diff --git a/confgenerator/testdata/feature/golden.csv b/confgenerator/testdata/feature/golden.csv index 155ca0086d..69d6078104 100644 --- a/confgenerator/testdata/feature/golden.csv +++ b/confgenerator/testdata/feature/golden.csv @@ -2,14 +2,6 @@ App,Field,Override, *apps.LoggingProcessorCassandraDebug,confgenerator.ConfigComponent.Type, *apps.LoggingProcessorCassandraGC,confgenerator.ConfigComponent.Type, *apps.LoggingProcessorCassandraSystem,confgenerator.ConfigComponent.Type, -*apps.LoggingProcessorCouchbaseGOXDCR,confgenerator.ConfigComponent.Type, -*apps.LoggingProcessorCouchbaseGOXDCR,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, -*apps.LoggingProcessorCouchbaseGOXDCR,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, -*apps.LoggingProcessorCouchbaseGOXDCR,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, -*apps.LoggingProcessorCouchbaseHTTPAccess,confgenerator.ConfigComponent.Type, -*apps.LoggingProcessorCouchbaseHTTPAccess,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, -*apps.LoggingProcessorCouchbaseHTTPAccess,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, -*apps.LoggingProcessorCouchbaseHTTPAccess,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, *apps.LoggingProcessorCouchdb,confgenerator.ConfigComponent.Type, *apps.LoggingProcessorHbaseSystem,confgenerator.ConfigComponent.Type, *apps.LoggingProcessorIisAccess,confgenerator.ConfigComponent.Type, @@ -37,10 +29,6 @@ App,Field,Override, *apps.LoggingReceiverCassandraSystem,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, *apps.LoggingReceiverCassandraSystem,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, *apps.LoggingReceiverCassandraSystem,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, -*apps.LoggingReceiverCouchbase,confgenerator.ConfigComponent.Type, -*apps.LoggingReceiverCouchbase,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, -*apps.LoggingReceiverCouchbase,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, -*apps.LoggingReceiverCouchbase,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, *apps.LoggingReceiverCouchdb,apps.LoggingProcessorCouchdb.confgenerator.ConfigComponent.Type, *apps.LoggingReceiverCouchdb,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, *apps.LoggingReceiverCouchdb,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, @@ -222,6 +210,13 @@ App,Field,Override, *confgenerator.PrometheusMetrics,config.[].scrape_configs.static_config_target_groups *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheAccess],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheError],confgenerator.ConfigComponent.Type, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.ConfigComponent.Type, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.BufferInMemory, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],confgenerator.ConfigComponent.Type, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseHTTPAccess],confgenerator.ConfigComponent.Type, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbase],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroElasticsearchJson],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroFlink],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroNginxAccess],confgenerator.ConfigComponent.Type, @@ -234,6 +229,12 @@ App,Field,Override, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheAccess]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheError]],ReceiverMacro, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheError]],confgenerator.ConfigComponent.Type, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR]],ReceiverMacro, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR]],confgenerator.ConfigComponent.Type, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseHTTPAccess]],ReceiverMacro, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseHTTPAccess]],confgenerator.ConfigComponent.Type, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbase]],ReceiverMacro, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbase]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroElasticsearchJson]],ReceiverMacro, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroElasticsearchJson]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroFlink]],ReceiverMacro, diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error index 78f8abc26d..1ec7515cab 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error index 78f8abc26d..1ec7515cab 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error index 3a4f1462b0..d00a6e26b0 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error index 3a4f1462b0..d00a6e26b0 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error index 4f3c8f92e8..fe2f587bca 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error index 4f3c8f92e8..fe2f587bca 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error index 13924fadc6..e7570651c4 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error index 13924fadc6..e7570651c4 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/3bca332f661c48e682cdb7a2bdf766e8.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/3bca332f661c48e682cdb7a2bdf766e8.lua new file mode 100644 index 0000000000..fb1b4cee6f --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/3bca332f661c48e682cdb7a2bdf766e8.lua @@ -0,0 +1,16 @@ + +local function trim_newline(s) + -- Check for a Windows-style carriage return and newline (\r\n) + if string.sub(s, -2) == "\r\n" then + return string.sub(s, 1, -3) + -- Check for a Unix/Linux-style newline (\n) + elseif string.sub(s, -1) == "\n" then + return string.sub(s, 1, -2) + end + -- If no trailing newline is found, return the original string + return s +end +function strip_newline(tag, timestamp, record) + record["message"] = trim_newline(record["message"]) + return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/70b18de0556f28eb634ccb944b2b33d0.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/70b18de0556f28eb634ccb944b2b33d0.lua new file mode 100644 index 0000000000..787c643396 --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/70b18de0556f28eb634ccb944b2b33d0.lua @@ -0,0 +1,12 @@ + +function process(tag, timestamp, record) +local v = "agent.googleapis.com/couchbase_http_access"; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["logging.googleapis.com/instrumentation_source"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json index 7ba3c2f031..346dbfd193 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml index 3bc86ae96d..5e6639b2f4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml @@ -18,6 +18,18 @@ feature: receivers:couchbase_general key: "[0].enabled" value: "true" +- module: logging + feature: receivers:couchbase_general + key: "[0].include_paths.__length" + value: "5" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].enabled" + value: "true" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].include_paths.__length" + value: "1" - module: logging feature: receivers:couchbase_goxdcr key: "[1].enabled" @@ -26,3 +38,7 @@ feature: receivers:couchbase_http_access key: "[2].enabled" value: "true" +- module: logging + feature: receivers:couchbase_http_access + key: "[2].include_paths.__length" + value: "2" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_main.conf index 4c856c9ace..d99aed7c1d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_main.conf @@ -30,6 +30,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_general + multiline.parser multiline.couchbase.couchbase_general storage.type filesystem [INPUT] @@ -45,6 +46,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_goxdcr + multiline.parser multiline.couchbase.couchbase_goxdcr storage.type filesystem [INPUT] @@ -115,10 +117,15 @@ storage.type memory [FILTER] - Match couchbase.couchbase_general - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_general.couchbase_general.multiline - Name multiline + Match couchbase.couchbase_general + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_general + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_general @@ -131,7 +138,7 @@ Match couchbase.couchbase_general Name parser Reserve_Data True - Parser couchbase.couchbase_general.couchbase_general.0 + Parser couchbase.couchbase_general.0.0 [FILTER] Match couchbase.couchbase_general @@ -152,10 +159,15 @@ script e26740abdc1963695135a3e2d6c55410.lua [FILTER] - Match couchbase.couchbase_goxdcr - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline - Name multiline + Match couchbase.couchbase_goxdcr + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_goxdcr + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_goxdcr @@ -168,7 +180,7 @@ Match couchbase.couchbase_goxdcr Name parser Reserve_Data True - Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Parser couchbase.couchbase_goxdcr.0.0 [FILTER] Match couchbase.couchbase_goxdcr @@ -199,7 +211,7 @@ Match couchbase.couchbase_http_access Name parser Reserve_Data True - Parser couchbase.couchbase_http_access.couchbase_http_access + Parser couchbase.couchbase_http_access.0 [FILTER] Match couchbase.couchbase_http_access @@ -207,6 +219,12 @@ call parser_merge_record script 5fc5f42c16c9e1ab8292e3d42f74f3be.lua +[FILTER] + Match couchbase.couchbase_http_access + Name lua + call process + script 70b18de0556f28eb634ccb944b2b33d0.lua + [FILTER] Match couchbase.couchbase_http_access Name lua diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf index c692b0f7f6..e44916efe8 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf @@ -1,20 +1,20 @@ [PARSER] Format regex - Name couchbase.couchbase_general.couchbase_general.0 + Name couchbase.couchbase_general.0.0 Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Name couchbase.couchbase_goxdcr.0.0 Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_http_access.couchbase_http_access + Name couchbase.couchbase_http_access.0 Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$ Time_Format %d/%b/%Y:%H:%M:%S %z Time_Key timestamp @@ -36,14 +36,14 @@ [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_general.couchbase_general.multiline + name multiline.couchbase.couchbase_general type regex rule "start_state" "^\[([^\s+:]*):" "cont" rule "cont" "^(?!\[([^\s+:]*):).*$" "cont" [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline + name multiline.couchbase.couchbase_goxdcr type regex rule "start_state" "^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" "cont" rule "cont" "^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})" "cont" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/3bca332f661c48e682cdb7a2bdf766e8.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/3bca332f661c48e682cdb7a2bdf766e8.lua new file mode 100644 index 0000000000..fb1b4cee6f --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/3bca332f661c48e682cdb7a2bdf766e8.lua @@ -0,0 +1,16 @@ + +local function trim_newline(s) + -- Check for a Windows-style carriage return and newline (\r\n) + if string.sub(s, -2) == "\r\n" then + return string.sub(s, 1, -3) + -- Check for a Unix/Linux-style newline (\n) + elseif string.sub(s, -1) == "\n" then + return string.sub(s, 1, -2) + end + -- If no trailing newline is found, return the original string + return s +end +function strip_newline(tag, timestamp, record) + record["message"] = trim_newline(record["message"]) + return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/70b18de0556f28eb634ccb944b2b33d0.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/70b18de0556f28eb634ccb944b2b33d0.lua new file mode 100644 index 0000000000..787c643396 --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/70b18de0556f28eb634ccb944b2b33d0.lua @@ -0,0 +1,12 @@ + +function process(tag, timestamp, record) +local v = "agent.googleapis.com/couchbase_http_access"; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["logging.googleapis.com/instrumentation_source"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json index 7ba3c2f031..346dbfd193 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml index 3bc86ae96d..5e6639b2f4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml @@ -18,6 +18,18 @@ feature: receivers:couchbase_general key: "[0].enabled" value: "true" +- module: logging + feature: receivers:couchbase_general + key: "[0].include_paths.__length" + value: "5" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].enabled" + value: "true" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].include_paths.__length" + value: "1" - module: logging feature: receivers:couchbase_goxdcr key: "[1].enabled" @@ -26,3 +38,7 @@ feature: receivers:couchbase_http_access key: "[2].enabled" value: "true" +- module: logging + feature: receivers:couchbase_http_access + key: "[2].include_paths.__length" + value: "2" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_main.conf index 4c856c9ace..d99aed7c1d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_main.conf @@ -30,6 +30,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_general + multiline.parser multiline.couchbase.couchbase_general storage.type filesystem [INPUT] @@ -45,6 +46,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_goxdcr + multiline.parser multiline.couchbase.couchbase_goxdcr storage.type filesystem [INPUT] @@ -115,10 +117,15 @@ storage.type memory [FILTER] - Match couchbase.couchbase_general - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_general.couchbase_general.multiline - Name multiline + Match couchbase.couchbase_general + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_general + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_general @@ -131,7 +138,7 @@ Match couchbase.couchbase_general Name parser Reserve_Data True - Parser couchbase.couchbase_general.couchbase_general.0 + Parser couchbase.couchbase_general.0.0 [FILTER] Match couchbase.couchbase_general @@ -152,10 +159,15 @@ script e26740abdc1963695135a3e2d6c55410.lua [FILTER] - Match couchbase.couchbase_goxdcr - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline - Name multiline + Match couchbase.couchbase_goxdcr + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_goxdcr + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_goxdcr @@ -168,7 +180,7 @@ Match couchbase.couchbase_goxdcr Name parser Reserve_Data True - Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Parser couchbase.couchbase_goxdcr.0.0 [FILTER] Match couchbase.couchbase_goxdcr @@ -199,7 +211,7 @@ Match couchbase.couchbase_http_access Name parser Reserve_Data True - Parser couchbase.couchbase_http_access.couchbase_http_access + Parser couchbase.couchbase_http_access.0 [FILTER] Match couchbase.couchbase_http_access @@ -207,6 +219,12 @@ call parser_merge_record script 5fc5f42c16c9e1ab8292e3d42f74f3be.lua +[FILTER] + Match couchbase.couchbase_http_access + Name lua + call process + script 70b18de0556f28eb634ccb944b2b33d0.lua + [FILTER] Match couchbase.couchbase_http_access Name lua diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf index c692b0f7f6..e44916efe8 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf @@ -1,20 +1,20 @@ [PARSER] Format regex - Name couchbase.couchbase_general.couchbase_general.0 + Name couchbase.couchbase_general.0.0 Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Name couchbase.couchbase_goxdcr.0.0 Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_http_access.couchbase_http_access + Name couchbase.couchbase_http_access.0 Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$ Time_Format %d/%b/%Y:%H:%M:%S %z Time_Key timestamp @@ -36,14 +36,14 @@ [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_general.couchbase_general.multiline + name multiline.couchbase.couchbase_general type regex rule "start_state" "^\[([^\s+:]*):" "cont" rule "cont" "^(?!\[([^\s+:]*):).*$" "cont" [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline + name multiline.couchbase.couchbase_goxdcr type regex rule "start_state" "^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" "cont" rule "cont" "^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})" "cont" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/3bca332f661c48e682cdb7a2bdf766e8.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/3bca332f661c48e682cdb7a2bdf766e8.lua new file mode 100644 index 0000000000..fb1b4cee6f --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/3bca332f661c48e682cdb7a2bdf766e8.lua @@ -0,0 +1,16 @@ + +local function trim_newline(s) + -- Check for a Windows-style carriage return and newline (\r\n) + if string.sub(s, -2) == "\r\n" then + return string.sub(s, 1, -3) + -- Check for a Unix/Linux-style newline (\n) + elseif string.sub(s, -1) == "\n" then + return string.sub(s, 1, -2) + end + -- If no trailing newline is found, return the original string + return s +end +function strip_newline(tag, timestamp, record) + record["message"] = trim_newline(record["message"]) + return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/70b18de0556f28eb634ccb944b2b33d0.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/70b18de0556f28eb634ccb944b2b33d0.lua new file mode 100644 index 0000000000..787c643396 --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/70b18de0556f28eb634ccb944b2b33d0.lua @@ -0,0 +1,12 @@ + +function process(tag, timestamp, record) +local v = "agent.googleapis.com/couchbase_http_access"; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["logging.googleapis.com/instrumentation_source"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json index 7ba3c2f031..346dbfd193 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml index 3bc86ae96d..5e6639b2f4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml @@ -18,6 +18,18 @@ feature: receivers:couchbase_general key: "[0].enabled" value: "true" +- module: logging + feature: receivers:couchbase_general + key: "[0].include_paths.__length" + value: "5" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].enabled" + value: "true" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].include_paths.__length" + value: "1" - module: logging feature: receivers:couchbase_goxdcr key: "[1].enabled" @@ -26,3 +38,7 @@ feature: receivers:couchbase_http_access key: "[2].enabled" value: "true" +- module: logging + feature: receivers:couchbase_http_access + key: "[2].include_paths.__length" + value: "2" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_main.conf index 02f5db79ef..12a985b3ee 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_main.conf @@ -30,6 +30,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_general + multiline.parser multiline.couchbase.couchbase_general storage.type filesystem [INPUT] @@ -45,6 +46,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_goxdcr + multiline.parser multiline.couchbase.couchbase_goxdcr storage.type filesystem [INPUT] @@ -108,10 +110,15 @@ storage.type memory [FILTER] - Match couchbase.couchbase_general - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_general.couchbase_general.multiline - Name multiline + Match couchbase.couchbase_general + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_general + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_general @@ -124,7 +131,7 @@ Match couchbase.couchbase_general Name parser Reserve_Data True - Parser couchbase.couchbase_general.couchbase_general.0 + Parser couchbase.couchbase_general.0.0 [FILTER] Match couchbase.couchbase_general @@ -145,10 +152,15 @@ script e26740abdc1963695135a3e2d6c55410.lua [FILTER] - Match couchbase.couchbase_goxdcr - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline - Name multiline + Match couchbase.couchbase_goxdcr + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_goxdcr + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_goxdcr @@ -161,7 +173,7 @@ Match couchbase.couchbase_goxdcr Name parser Reserve_Data True - Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Parser couchbase.couchbase_goxdcr.0.0 [FILTER] Match couchbase.couchbase_goxdcr @@ -192,7 +204,7 @@ Match couchbase.couchbase_http_access Name parser Reserve_Data True - Parser couchbase.couchbase_http_access.couchbase_http_access + Parser couchbase.couchbase_http_access.0 [FILTER] Match couchbase.couchbase_http_access @@ -200,6 +212,12 @@ call parser_merge_record script 5fc5f42c16c9e1ab8292e3d42f74f3be.lua +[FILTER] + Match couchbase.couchbase_http_access + Name lua + call process + script 70b18de0556f28eb634ccb944b2b33d0.lua + [FILTER] Match couchbase.couchbase_http_access Name lua diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf index 01ef8df562..deb16e26ab 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf @@ -1,20 +1,20 @@ [PARSER] Format regex - Name couchbase.couchbase_general.couchbase_general.0 + Name couchbase.couchbase_general.0.0 Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Name couchbase.couchbase_goxdcr.0.0 Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_http_access.couchbase_http_access + Name couchbase.couchbase_http_access.0 Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$ Time_Format %d/%b/%Y:%H:%M:%S %z Time_Key timestamp @@ -43,14 +43,14 @@ [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_general.couchbase_general.multiline + name multiline.couchbase.couchbase_general type regex rule "start_state" "^\[([^\s+:]*):" "cont" rule "cont" "^(?!\[([^\s+:]*):).*$" "cont" [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline + name multiline.couchbase.couchbase_goxdcr type regex rule "start_state" "^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" "cont" rule "cont" "^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})" "cont" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/3bca332f661c48e682cdb7a2bdf766e8.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/3bca332f661c48e682cdb7a2bdf766e8.lua new file mode 100644 index 0000000000..fb1b4cee6f --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/3bca332f661c48e682cdb7a2bdf766e8.lua @@ -0,0 +1,16 @@ + +local function trim_newline(s) + -- Check for a Windows-style carriage return and newline (\r\n) + if string.sub(s, -2) == "\r\n" then + return string.sub(s, 1, -3) + -- Check for a Unix/Linux-style newline (\n) + elseif string.sub(s, -1) == "\n" then + return string.sub(s, 1, -2) + end + -- If no trailing newline is found, return the original string + return s +end +function strip_newline(tag, timestamp, record) + record["message"] = trim_newline(record["message"]) + return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/70b18de0556f28eb634ccb944b2b33d0.lua b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/70b18de0556f28eb634ccb944b2b33d0.lua new file mode 100644 index 0000000000..787c643396 --- /dev/null +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/70b18de0556f28eb634ccb944b2b33d0.lua @@ -0,0 +1,12 @@ + +function process(tag, timestamp, record) +local v = "agent.googleapis.com/couchbase_http_access"; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["logging.googleapis.com/instrumentation_source"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json index 7ba3c2f031..346dbfd193 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml index 3bc86ae96d..5e6639b2f4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml @@ -18,6 +18,18 @@ feature: receivers:couchbase_general key: "[0].enabled" value: "true" +- module: logging + feature: receivers:couchbase_general + key: "[0].include_paths.__length" + value: "5" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].enabled" + value: "true" +- module: logging + feature: receivers:couchbase_goxdcr + key: "[1].include_paths.__length" + value: "1" - module: logging feature: receivers:couchbase_goxdcr key: "[1].enabled" @@ -26,3 +38,7 @@ feature: receivers:couchbase_http_access key: "[2].enabled" value: "true" +- module: logging + feature: receivers:couchbase_http_access + key: "[2].include_paths.__length" + value: "2" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_main.conf index 02f5db79ef..12a985b3ee 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_main.conf @@ -30,6 +30,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_general + multiline.parser multiline.couchbase.couchbase_general storage.type filesystem [INPUT] @@ -45,6 +46,7 @@ Rotate_Wait 30 Skip_Long_Lines On Tag couchbase.couchbase_goxdcr + multiline.parser multiline.couchbase.couchbase_goxdcr storage.type filesystem [INPUT] @@ -108,10 +110,15 @@ storage.type memory [FILTER] - Match couchbase.couchbase_general - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_general.couchbase_general.multiline - Name multiline + Match couchbase.couchbase_general + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_general + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_general @@ -124,7 +131,7 @@ Match couchbase.couchbase_general Name parser Reserve_Data True - Parser couchbase.couchbase_general.couchbase_general.0 + Parser couchbase.couchbase_general.0.0 [FILTER] Match couchbase.couchbase_general @@ -145,10 +152,15 @@ script e26740abdc1963695135a3e2d6c55410.lua [FILTER] - Match couchbase.couchbase_goxdcr - Multiline.Key_Content message - Multiline.Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline - Name multiline + Match couchbase.couchbase_goxdcr + Name modify + Rename log message + +[FILTER] + Match couchbase.couchbase_goxdcr + Name lua + call strip_newline + script 3bca332f661c48e682cdb7a2bdf766e8.lua [FILTER] Match couchbase.couchbase_goxdcr @@ -161,7 +173,7 @@ Match couchbase.couchbase_goxdcr Name parser Reserve_Data True - Parser couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Parser couchbase.couchbase_goxdcr.0.0 [FILTER] Match couchbase.couchbase_goxdcr @@ -192,7 +204,7 @@ Match couchbase.couchbase_http_access Name parser Reserve_Data True - Parser couchbase.couchbase_http_access.couchbase_http_access + Parser couchbase.couchbase_http_access.0 [FILTER] Match couchbase.couchbase_http_access @@ -200,6 +212,12 @@ call parser_merge_record script 5fc5f42c16c9e1ab8292e3d42f74f3be.lua +[FILTER] + Match couchbase.couchbase_http_access + Name lua + call process + script 70b18de0556f28eb634ccb944b2b33d0.lua + [FILTER] Match couchbase.couchbase_http_access Name lua diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf index 01ef8df562..deb16e26ab 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf @@ -1,20 +1,20 @@ [PARSER] Format regex - Name couchbase.couchbase_general.couchbase_general.0 + Name couchbase.couchbase_general.0.0 Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_goxdcr.couchbase_goxdcr.0 + Name couchbase.couchbase_goxdcr.0.0 Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex - Name couchbase.couchbase_http_access.couchbase_http_access + Name couchbase.couchbase_http_access.0 Regex ^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?[^\]]*)\] "(?\S+) (?\S+) (?\S+)" (?[^ ]*) (?[^ ]*\S+) (?[^ ]*) "(?[^\"]*)" (?.*)$ Time_Format %d/%b/%Y:%H:%M:%S %z Time_Key timestamp @@ -43,14 +43,14 @@ [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_general.couchbase_general.multiline + name multiline.couchbase.couchbase_general type regex rule "start_state" "^\[([^\s+:]*):" "cont" rule "cont" "^(?!\[([^\s+:]*):).*$" "cont" [MULTILINE_PARSER] flush_timeout 1000 - name couchbase.couchbase_goxdcr.couchbase_goxdcr.multiline + name multiline.couchbase.couchbase_goxdcr type regex rule "start_state" "^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}" "cont" rule "cont" "^(?!\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})" "cont" From 07f10812a90e4a19a27e79414322efa475c48e9a Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Mon, 18 Aug 2025 18:25:50 +0000 Subject: [PATCH 06/11] removed undeeded code --- apps/couchbase.go | 5 +---- confgenerator/testdata/feature/golden.csv | 4 ---- .../golden/linux-gpu/feature_tracking_otlp.json | 2 +- .../golden/linux-gpu/features.yaml | 4 ---- .../golden/linux/feature_tracking_otlp.json | 2 +- .../logging-receiver_couchbase/golden/linux/features.yaml | 4 ---- .../golden/windows-2012/feature_tracking_otlp.json | 2 +- .../golden/windows-2012/features.yaml | 4 ---- .../golden/windows/feature_tracking_otlp.json | 2 +- .../logging-receiver_couchbase/golden/windows/features.yaml | 4 ---- 10 files changed, 5 insertions(+), 28 deletions(-) diff --git a/apps/couchbase.go b/apps/couchbase.go index 62d3236f5a..d060c78fc2 100644 --- a/apps/couchbase.go +++ b/apps/couchbase.go @@ -371,10 +371,7 @@ func loggingReceiverFilesMixinCouchbaseHTTPAccess() confgenerator.LoggingReceive } // LoggingProcessorCouchbaseGOXDCR is a struct that iwll generate the fluentbit components for the goxdcr logs -type LoggingProcessorMacroCouchbaseGOXDCR struct { - confgenerator.ConfigComponent `yaml:",inline"` - ReceiverMixin confgenerator.LoggingReceiverFilesMixin `yaml:",inline" validate:"structonly"` -} +type LoggingProcessorMacroCouchbaseGOXDCR struct{} // Type returns the type string for the cross datacenter logs of couchbase func (p LoggingProcessorMacroCouchbaseGOXDCR) Type() string { diff --git a/confgenerator/testdata/feature/golden.csv b/confgenerator/testdata/feature/golden.csv index 69d6078104..2981a74625 100644 --- a/confgenerator/testdata/feature/golden.csv +++ b/confgenerator/testdata/feature/golden.csv @@ -210,10 +210,6 @@ App,Field,Override, *confgenerator.PrometheusMetrics,config.[].scrape_configs.static_config_target_groups *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheAccess],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroApacheError],confgenerator.ConfigComponent.Type, -*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.ConfigComponent.Type, -*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.BufferInMemory, -*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, -*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],apps.LoggingProcessorMacroCouchbaseGOXDCR.confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseGOXDCR],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbaseHTTPAccess],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroCouchbase],confgenerator.ConfigComponent.Type, diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json index 346dbfd193..8cfd7ee9b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml index 5e6639b2f4..9b57f192b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml @@ -30,10 +30,6 @@ feature: receivers:couchbase_goxdcr key: "[1].include_paths.__length" value: "1" -- module: logging - feature: receivers:couchbase_goxdcr - key: "[1].enabled" - value: "true" - module: logging feature: receivers:couchbase_http_access key: "[2].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json index 346dbfd193..8cfd7ee9b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml index 5e6639b2f4..9b57f192b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml @@ -30,10 +30,6 @@ feature: receivers:couchbase_goxdcr key: "[1].include_paths.__length" value: "1" -- module: logging - feature: receivers:couchbase_goxdcr - key: "[1].enabled" - value: "true" - module: logging feature: receivers:couchbase_http_access key: "[2].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json index 346dbfd193..8cfd7ee9b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml index 5e6639b2f4..9b57f192b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml @@ -30,10 +30,6 @@ feature: receivers:couchbase_goxdcr key: "[1].include_paths.__length" value: "1" -- module: logging - feature: receivers:couchbase_goxdcr - key: "[1].enabled" - value: "true" - module: logging feature: receivers:couchbase_http_access key: "[2].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json index 346dbfd193..8cfd7ee9b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml index 5e6639b2f4..9b57f192b4 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml @@ -30,10 +30,6 @@ feature: receivers:couchbase_goxdcr key: "[1].include_paths.__length" value: "1" -- module: logging - feature: receivers:couchbase_goxdcr - key: "[1].enabled" - value: "true" - module: logging feature: receivers:couchbase_http_access key: "[2].enabled" From 30f88855cf8824d1b2a76902bef848da16640b48 Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Tue, 19 Aug 2025 13:46:48 +0000 Subject: [PATCH 07/11] added new line to input.log --- .../input.log | 2 +- .../output_fluentbit.yaml | 12 ++++++++++ .../input.log | 2 +- .../output_fluentbit.yaml | 10 ++++++++ .../input.log | 2 +- .../output_fluentbit.yaml | 24 +++++++++++++++++++ .../output_otel.yaml | 22 +++++++++++++++++ 7 files changed, 71 insertions(+), 3 deletions(-) diff --git a/transformation_test/testdata/logging_processor-couchbase-general/input.log b/transformation_test/testdata/logging_processor-couchbase-general/input.log index 96ca98fcad..2a238ce912 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/input.log +++ b/transformation_test/testdata/logging_processor-couchbase-general/input.log @@ -5,4 +5,4 @@ Continuation line giving rebalance details Still continuing additional rebalance logs with memory usage stats... [ns_server:info,2025-08-18T09:17:30.333Z,ns_1@127.0.0.1:0000:cluster_manager]Node 'ns_1@127.0.0.1' added to cluster -[ns_server:error,2025-08-18T09:18:00.741Z,ns_1@127.0.0.1:0000:ssl_certificate]SSL handshake failed: certificate expired \ No newline at end of file +[ns_server:error,2025-08-18T09:18:00.741Z,ns_1@127.0.0.1:0000:ssl_certificate]SSL handshake failed: certificate expired diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml index 0b5db622bf..b81bad87d1 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml @@ -47,6 +47,18 @@ logName: projects/my-project/logs/transformation_test severity: 100.0 timestamp: 2025-08-18T09:16:55.987000000Z + - jsonPayload: + level: info + message: Node 'ns_1@127.0.0.1' added to cluster + node_name: ns_1@127.0.0.1 + source: cluster_manager + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/transformation_test + severity: 200.0 + timestamp: 2025-08-18T09:17:30.333000000Z partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log index 10e30582f4..5f722187da 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/input.log @@ -3,4 +3,4 @@ 2025-08-18T14:27:22.345Z ERROR Router: Failed to route mutation for key "user:12345", retrying... Additional detail: document size exceeded configured threshold 2025-08-18T14:27:45.657Z DEBUG BackfillManager: Backfill task created for vbucket 102 -2025-08-18T14:28:00.998Z INFO PipelineManager: Replication pipeline stopped successfully \ No newline at end of file +2025-08-18T14:28:00.998Z INFO PipelineManager: Replication pipeline stopped successfully diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml index 31cadeadfa..ab205838fb 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml @@ -29,6 +29,16 @@ logName: projects/my-project/logs/transformation_test severity: 500.0 timestamp: 2025-08-18T14:27:22.345000000Z + - jsonPayload: + level: DEBUG + log_type: BackfillManager + message: Backfill task created for vbucket 102 + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/transformation_test + severity: 100.0 + timestamp: 2025-08-18T14:27:45.657000000Z partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/input.log b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log index 274620bbf7..be5756c2bd 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/input.log +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/input.log @@ -7,4 +7,4 @@ 192.168.1.17 couchbase.local - [18/Aug/2025:09:23:01 +0000] "HEAD /pools/default/buckets/travel-data/docs/user:999 HTTP/1.1" 304 0 - "Go-http-client/1.1" Not modified 192.168.1.18 couchbase.local - [18/Aug/2025:09:23:40 +0000] "OPTIONS /pools/default/buckets/travel-data HTTP/1.1" 204 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" Preflight check passed 192.168.1.19 couchbase.local - [18/Aug/2025:09:24:15 +0000] "GET /pools/default/buckets/travel-data/docs?limit=1000 HTTP/1.1" 413 0 - "curl/8.0.1" Payload too large -192.168.1.20 couchbase.local - [18/Aug/2025:09:25:00 +0000] "PATCH /pools/default/buckets/travel-data/docs/user:321 HTTP/1.1" 409 128 - "python-requests/2.31.0" Document conflict \ No newline at end of file +192.168.1.20 couchbase.local - [18/Aug/2025:09:25:00 +0000] "PATCH /pools/default/buckets/travel-data/docs/user:321 HTTP/1.1" 409 128 - "python-requests/2.31.0" Document conflict diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml index 590c4fb3e2..e82ac5492d 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_fluentbit.yaml @@ -215,6 +215,30 @@ logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access logName: projects/my-project/logs/transformation_test timestamp: 2025-08-18T09:24:15.000000000Z + - httpRequest: + cacheFillBytes: 0.0 + cacheHit: false + cacheLookup: false + cacheValidatedWithOriginServer: false + protocol: HTTP/1.1 + referer: "" + remoteIp: 192.168.1.20 + requestMethod: PATCH + requestSize: 0.0 + requestUrl: /pools/default/buckets/travel-data/docs/user:321 + responseSize: 128.0 + serverIp: "" + status: 409.0 + userAgent: python-requests/2.31.0 + jsonPayload: + host: couchbase.local + message: Document conflict + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T09:25:00.000000000Z partialSuccess: true resource: labels: {} diff --git a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml index 51fa2bdc7e..ceca30f07c 100644 --- a/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-http-access/output_otel.yaml @@ -193,4 +193,26 @@ zone: test-zone type: gce_instance timestamp: 2025-08-18T09:24:15Z + - httpRequest: + protocol: HTTP/1.1 + remoteIp: 192.168.1.20 + requestMethod: PATCH + requestUrl: /pools/default/buckets/travel-data/docs/user:321 + responseSize: "128" + status: 409 + userAgent: python-requests/2.31.0 + jsonPayload: + host: couchbase.local + message: Document conflict + user: - + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_http_access + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + timestamp: 2025-08-18T09:25:00Z partialSuccess: true From 1b17692d8ca8574e48dac4db1b962178b910229d Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Tue, 26 Aug 2025 14:29:02 +0000 Subject: [PATCH 08/11] updated regex to correctly capture multiline --- apps/couchbase.go | 4 ++-- .../output_fluentbit.yaml | 5 ++++- .../logging_processor-couchbase-goxcdr/output_fluentbit.yaml | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/couchbase.go b/apps/couchbase.go index d060c78fc2..eb02ea894d 100644 --- a/apps/couchbase.go +++ b/apps/couchbase.go @@ -251,7 +251,7 @@ func (p LoggingProcessorMacroCouchbase) Expand(ctx context.Context) []confgenera LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ Parsers: []confgenerator.RegexParser{ { - Regex: `^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$`, + Regex: `^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?[\s|\S]*)?`, Parser: confgenerator.ParserShared{ TimeKey: "timestamp", TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", @@ -385,7 +385,7 @@ func (p LoggingProcessorMacroCouchbaseGOXDCR) Expand(ctx context.Context) []conf LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ Parsers: []confgenerator.RegexParser{ { - Regex: `^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$`, + Regex: `^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?[\s|\S]*)?`, Parser: confgenerator.ParserShared{ TimeKey: "timestamp", TimeFormat: "%Y-%m-%dT%H:%M:%S.%L", diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml index b81bad87d1..6323704f0c 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_fluentbit.yaml @@ -37,7 +37,10 @@ timestamp: 2025-08-18T09:16:33.764000000Z - jsonPayload: level: debug - message: "Rebalance progress: 45% completed" + message: |- + Rebalance progress: 45% completed + Continuation line giving rebalance details + Still continuing additional rebalance logs with memory usage stats... node_name: ns_1@127.0.0.1 source: rebalance type: ns_server diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml index ab205838fb..b4cc7f21d7 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_fluentbit.yaml @@ -22,7 +22,9 @@ - jsonPayload: level: ERROR log_type: Router - message: Failed to route mutation for key "user:12345", retrying... + message: |- + Failed to route mutation for key "user:12345", retrying... + Additional detail: document size exceeded configured threshold labels: compute.googleapis.com/resource_name: hostname logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr From 42ef74bc2560f24c6e828482885fe202c1d7341b Mon Sep 17 00:00:00 2001 From: Dylan Strohschein Date: Tue, 26 Aug 2025 14:29:55 +0000 Subject: [PATCH 09/11] update golden files --- .../golden/linux-gpu/fluent_bit_parser.conf | 4 ++-- .../golden/linux/fluent_bit_parser.conf | 4 ++-- .../golden/windows-2012/fluent_bit_parser.conf | 4 ++-- .../golden/windows/fluent_bit_parser.conf | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf index e44916efe8..4543667908 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/fluent_bit_parser.conf @@ -1,14 +1,14 @@ [PARSER] Format regex Name couchbase.couchbase_general.0.0 - Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ + Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex Name couchbase.couchbase_goxdcr.0.0 - Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ + Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf index e44916efe8..4543667908 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/fluent_bit_parser.conf @@ -1,14 +1,14 @@ [PARSER] Format regex Name couchbase.couchbase_general.0.0 - Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ + Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex Name couchbase.couchbase_goxdcr.0.0 - Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ + Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf index deb16e26ab..96298653de 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/fluent_bit_parser.conf @@ -1,14 +1,14 @@ [PARSER] Format regex Name couchbase.couchbase_general.0.0 - Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ + Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex Name couchbase.couchbase_goxdcr.0.0 - Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ + Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf index deb16e26ab..96298653de 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/fluent_bit_parser.conf @@ -1,14 +1,14 @@ [PARSER] Format regex Name couchbase.couchbase_general.0.0 - Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?.*)$ + Regex ^\[(?[^:]*):(?[^,]*),(?\d+-\d+-\d+T\d+:\d+:\d+.\d+Z),(?[^:]*):([^:]+):(?[^\]]+)\](?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp [PARSER] Format regex Name couchbase.couchbase_goxdcr.0.0 - Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?.*)$ + Regex ^(?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d*Z) (?\w+) (?\w+.\w+): (?[\s|\S]*)? Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Key timestamp From 3179a559c4ac37cc105d2b368891b9ce64d85bf5 Mon Sep 17 00:00:00 2001 From: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> Date: Mon, 24 Nov 2025 01:43:30 +0000 Subject: [PATCH 10/11] Update confgenerator goldens. --- .../golden/linux-gpu/error | 2 +- .../golden/linux/error | 2 +- .../golden/windows-2012/error | 2 +- .../golden/windows/error | 2 +- .../golden/linux-gpu/error | 2 +- .../golden/linux/error | 2 +- .../golden/windows-2012/error | 2 +- .../golden/windows/error | 2 +- .../golden/linux-gpu/feature_tracking_otlp.json | 2 +- .../logging-receiver_couchbase/golden/linux-gpu/features.yaml | 2 +- .../golden/linux/feature_tracking_otlp.json | 2 +- .../logging-receiver_couchbase/golden/linux/features.yaml | 2 +- .../golden/windows-2012/feature_tracking_otlp.json | 2 +- .../golden/windows-2012/features.yaml | 2 +- .../golden/windows/feature_tracking_otlp.json | 2 +- .../logging-receiver_couchbase/golden/windows/features.yaml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error index eee95c1067..be5b342e8a 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error index eee95c1067..be5b342e8a 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error index df05e90631..71dc213de7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error index df05e90631..71dc213de7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error index aae9033f8a..c06e595037 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error index aae9033f8a..c06e595037 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error index 069e5e512e..a4cc570ab9 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error index 069e5e512e..a4cc570ab9 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchbase_general, couchbase_goxdcr, couchbase_http_access, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hadoop, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system, zookeeper_general]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json index 8cfd7ee9b4..3f348e3634 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml index 9b57f192b4..fa4b32883f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux-gpu/features.yaml @@ -13,7 +13,7 @@ - module: logging feature: service:otel_logging key: otel_logging_supported_config - value: "false" + value: "true" - module: logging feature: receivers:couchbase_general key: "[0].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json index 8cfd7ee9b4..3f348e3634 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml index 9b57f192b4..fa4b32883f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/linux/features.yaml @@ -13,7 +13,7 @@ - module: logging feature: service:otel_logging key: otel_logging_supported_config - value: "false" + value: "true" - module: logging feature: receivers:couchbase_general key: "[0].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json index 8cfd7ee9b4..3f348e3634 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml index 9b57f192b4..fa4b32883f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows-2012/features.yaml @@ -13,7 +13,7 @@ - module: logging feature: service:otel_logging key: otel_logging_supported_config - value: "false" + value: "true" - module: logging feature: receivers:couchbase_general key: "[0].enabled" diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json index 8cfd7ee9b4..3f348e3634 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_general"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"5"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_goxdcr"}},{"key":"key","value":{"stringValue":"[1].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:couchbase_http_access"}},{"key":"key","value":{"stringValue":"[2].include_paths.__length"}},{"key":"value","value":{"stringValue":"2"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml index 9b57f192b4..fa4b32883f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_couchbase/golden/windows/features.yaml @@ -13,7 +13,7 @@ - module: logging feature: service:otel_logging key: otel_logging_supported_config - value: "false" + value: "true" - module: logging feature: receivers:couchbase_general key: "[0].enabled" From d75fcc0fbaf3dd5d001a0c2ab17fd335d9772aff Mon Sep 17 00:00:00 2001 From: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> Date: Mon, 24 Nov 2025 01:43:42 +0000 Subject: [PATCH 11/11] Update transformation test goldens. --- .../output_otel.yaml | 195 +++++++++++++++++- .../output_otel.yaml | 153 +++++++++++++- 2 files changed, 346 insertions(+), 2 deletions(-) diff --git a/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml index c83821d3ed..fc48a90a3b 100644 --- a/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-general/output_otel.yaml @@ -1 +1,194 @@ -- config_error: "processor \"processor0\" has invalid configuration: unimplemented" +- entries: + - jsonPayload: + level: info + message: Bucket 'travel-data' created with 3 replicas + node_name: ns_1@127.0.0.1 + source: menelaus_web + timestamp: 2025-08-18T09:15:12.123Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: INFO + timestamp: now + - jsonPayload: + level: warn + message: Index build taking longer than expected on bucket 'travel-data' + node_name: ns_1@127.0.0.1 + source: index_updater + timestamp: 2025-08-18T09:16:05.452Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: WARNING + timestamp: now + - jsonPayload: + level: error + message: "Failed to allocate memory for vbuckets: insufficient quota" + node_name: ns_1@127.0.0.1 + source: bucket_engine + timestamp: 2025-08-18T09:16:33.764Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: ERROR + timestamp: now + - jsonPayload: + level: debug + message: |- + Rebalance progress: 45% completed + Continuation line giving rebalance details + Still continuing additional rebalance logs with memory usage stats... + node_name: ns_1@127.0.0.1 + source: rebalance + timestamp: 2025-08-18T09:16:55.987Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: DEBUG + timestamp: now + - jsonPayload: + level: info + message: Node 'ns_1@127.0.0.1' added to cluster + node_name: ns_1@127.0.0.1 + source: cluster_manager + timestamp: 2025-08-18T09:17:30.333Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: INFO + timestamp: now + partialSuccess: true +- entries: + - jsonPayload: + level: error + message: "SSL handshake failed: certificate expired" + node_name: ns_1@127.0.0.1 + source: ssl_certificate + timestamp: 2025-08-18T09:18:00.741Z + type: ns_server + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_general + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: ERROR + timestamp: now + partialSuccess: true +- collector_errors: + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:15:12.123Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:16:05.452Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:16:33.764Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:16:55.987Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:17:30.333Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T09:18:00.741Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) diff --git a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml index c83821d3ed..09bd074381 100644 --- a/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-couchbase-goxcdr/output_otel.yaml @@ -1 +1,152 @@ -- config_error: "processor \"processor0\" has invalid configuration: unimplemented" +- entries: + - jsonPayload: + level: INFO + log_type: PipelineManager + message: Starting replication pipeline for bucket travel-data + timestamp: 2025-08-18T14:27:02.452Z + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: INFO + timestamp: now + - jsonPayload: + level: WARN + log_type: XDCR.CheckpointService + message: Failed to save checkpoint due to timeout + timestamp: 2025-08-18T14:27:10.874Z + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: WARNING + timestamp: now + - jsonPayload: + level: ERROR + log_type: Router + message: |- + Failed to route mutation for key "user:12345", retrying... + Additional detail: document size exceeded configured threshold + timestamp: 2025-08-18T14:27:22.345Z + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: ERROR + timestamp: now + - jsonPayload: + level: DEBUG + log_type: BackfillManager + message: Backfill task created for vbucket 102 + timestamp: 2025-08-18T14:27:45.657Z + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: DEBUG + timestamp: now + partialSuccess: true +- entries: + - jsonPayload: + level: INFO + log_type: PipelineManager + message: Replication pipeline stopped successfully + timestamp: 2025-08-18T14:28:00.998Z + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/couchbase_goxdcr + logName: projects/my-project/logs/my-log-name + resource: + labels: + instance_id: test-instance-id + zone: test-zone + type: gce_instance + severity: INFO + timestamp: now + partialSuccess: true +- collector_errors: + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T14:27:02.452Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T14:27:10.874Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T14:27:22.345Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T14:27:45.657Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil) + - caller: ottl@v0.136.0/parser.go:410 + error: "parsing time \"2025-08-18T14:28:00.998Z\": extra text: \"Z\"" + level: warn + msg: failed to execute statement + otelcol.component.id: transform/logs_transformation__test_my-log-name_1 + otelcol.component.kind: processor + otelcol.pipeline.id: logs/logs_transformation__test_my-log-name + otelcol.signal: logs + resource: + service.instance.id: test-service-instance-id + service.name: otelopscol + service.version: v0.136.0 + statement: set(log.cache["__time_valid"], true) where ((log.body != nil and log.body["timestamp"] != nil) and Time(log.body["timestamp"], "%Y-%m-%dT%H:%M:%S.%L") != nil)