Aix config#1
Closed
Dylan-M wants to merge 4 commits into
Closed
Conversation
Dylan-M
pushed a commit
that referenced
this pull request
Jun 18, 2025
…elemetry#40559) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Prometheus remote write exporter add extra logs for the RW2 code path. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes Partially implements open-telemetry#33661 (when merging PR please don't close the tracing issue) <!--Describe what testing was performed and which tests were added.--> #### Testing * [x] e2e ran with prometheus locally Sample of the logs running against both Prometheus `v3.4.1` and `v2.53.1` (which doesn't support RW2).  ``` 2025-06-09T17:15:44.390+0200 info grpc@v1.72.2/server.go:886 [core] [Server #1 ListenSocket open-telemetry#2]ListenSocket created {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "grpc_log": true} 2025-06-09T17:15:52.173+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:53.968+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:57.164+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:58.966+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:425 X-Prometheus-Remote-Write-Samples-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "22"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:428 X-Prometheus-Remote-Write-Histograms-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:431 X-Prometheus-Remote-Write-Exemplars-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "exemplars_written": "0"} 2025-06-09T17:16:03.967+0200 debug prometheusremotewriteexporter/exporter.go:425 X-Prometheus-Remote-Write-Samples-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "290"} 2025-06-09T17:16:03.967+0200 debug prometheusremotewriteexporter/exporter.go:428 X-Prometheus-Remote-Write-Histograms-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"} ``` cc @krajorama @ywwg
Dylan-M
pushed a commit
that referenced
this pull request
Aug 5, 2025
…elemetry#40559) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Prometheus remote write exporter add extra logs for the RW2 code path. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes Partially implements open-telemetry#33661 (when merging PR please don't close the tracing issue) <!--Describe what testing was performed and which tests were added.--> #### Testing * [x] e2e ran with prometheus locally Sample of the logs running against both Prometheus `v3.4.1` and `v2.53.1` (which doesn't support RW2).  ``` 2025-06-09T17:15:44.390+0200 info grpc@v1.72.2/server.go:886 [core] [Server #1 ListenSocket open-telemetry#2]ListenSocket created {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "grpc_log": true} 2025-06-09T17:15:52.173+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:53.968+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:57.164+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:15:58.966+0200 warn prometheusremotewriteexporter/exporter.go:420 X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2. {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:425 X-Prometheus-Remote-Write-Samples-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "22"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:428 X-Prometheus-Remote-Write-Histograms-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"} 2025-06-09T17:16:02.164+0200 debug prometheusremotewriteexporter/exporter.go:431 X-Prometheus-Remote-Write-Exemplars-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "exemplars_written": "0"} 2025-06-09T17:16:03.967+0200 debug prometheusremotewriteexporter/exporter.go:425 X-Prometheus-Remote-Write-Samples-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "290"} 2025-06-09T17:16:03.967+0200 debug prometheusremotewriteexporter/exporter.go:428 X-Prometheus-Remote-Write-Histograms-Written {"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"} ``` cc @krajorama @ywwg
Dylan-M
pushed a commit
that referenced
this pull request
Oct 3, 2025
…b.uid (open-telemetry#42641) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds support to expose `k8s.cronjob.uid` as resource metadata when a `Job` is owned by a `CronJob`. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#42557 <!--Describe what testing was performed and which tests were added.--> #### Testing Local tested with `telemetrygen` and is working as expected. ``` [pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"debug","ts":"2025-09-11T16:29:11.588Z","caller":"k8sattributesprocessor@v0.135.0/processor.go:159","msg":"getting the pod","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"k8sattributes","otelcol.component.kind":"processor","otelcol.pipeline.id":"traces","otelcol.signal":"traces","pod":{"Name":"otel-log-cronjob-29293469-lw97x","Address":"10.244.0.70","PodUID":"7960681c-5a24-4287-8bea-e2cf506500ee","Attributes":{"k8s.cronjob.name":"otel-log-cronjob","k8s.cronjob.uid":"082b1c42-e393-46bc-9d51-b20a3700d1ab","k8s.job.name":"otel-log-cronjob-29293469","k8s.job.uid":"fbd853b8-7f63-44d8-ace1-8b48c89e3041"},"StartTime":"2025-09-11T16:29:00Z","Ignore":false,"Namespace":"default","NodeName":"","DeploymentUID":"","StatefulSetUID":"","DaemonSetUID":"","JobUID":"fbd853b8-7f63-44d8-ace1-8b48c89e3041","HostNetwork":false,"Containers":{"ByID":null,"ByName":null},"DeletedAt":"0001-01-01T00:00:00Z"}} [pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"Traces","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces","resource spans":1,"spans":2} [pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"ResourceSpans #0\nResource SchemaURL: https://opentelemetry.io/schemas/1.4.0\nResource attributes:\n -> k8s.container.name: Str(telemetrygen)\n -> service.name: Str(telemetrygen)\n -> k8s.pod.ip: Str(10.244.0.70)\n -> k8s.cronjob.name: Str(otel-log-cronjob)\n -> k8s.cronjob.uid: Str(082b1c42-e393-46bc-9d51-b20a3700d1ab)\n -> k8s.job.uid: Str(fbd853b8-7f63-44d8-ace1-8b48c89e3041)\n -> k8s.job.name: Str(otel-log-cronjob-29293469)\nScopeSpans #0\nScopeSpans SchemaURL: \nInstrumentationScope telemetrygen \nSpan #0\n Trace ID : 3c7381c14a37814676b00a7d961cb219\n Parent ID : 4f8780d5148a9c1c\n ID : 17e9da9533dc93ca\n Name : okey-dokey-0\n Kind : Server\n Start time : 2025-09-11 16:29:09.583785469 +0000 UTC\n End time : 2025-09-11 16:29:09.583908469 +0000 UTC\n Status code : Unset\n Status message : \nAttributes:\n -> net.peer.ip: Str(1.2.3.4)\n -> peer.service: Str(telemetrygen-client)\nSpan #1\n Trace ID : 3c7381c14a37814676b00a7d961cb219\n Parent ID : \n ID : 4f8780d5148a9c1c\n Name : lets-go\n Kind : Client\n Start time : 2025-09-11 16:29:09.583785469 +0000 UTC\n End time : 2025-09-11 16:29:09.583908469 +0000 UTC\n Status code : Unset\n Status message : \nAttributes:\n -> net.peer.ip: Str(1.2.3.4)\n -> peer.service: Str(telemetrygen-server)\n","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces"} ``` Added also the tests to guarantee the proper functionality. --------- Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Dylan-M
pushed a commit
that referenced
this pull request
Dec 16, 2025
…-telemetry#43882) #### Description Currently `{TraceID,SpanID,ProfileID}` only support byte IDs, however in open-telemetry#43429 it was brought up that it is difficult to take a string representation of an ID and directly use that to set a trace ID. This would be for a hexadecimal string representation comprising 32 bytes. This change allows the `{TraceID,SpanID,ProfileID}` functions to also work on string inputs. In short, the following now works: ```yaml statements: - set(span.trace_id, TraceID("a389023abaa839283293ed323892389d")) ``` #### Link to tracking issue Fixes open-telemetry#43429 #### Testing In addition to the included go tests the following config [test-str-trace.yml](https://github.com/user-attachments/files/23217501/test-str-trace.yml) was used to manually test by invoking `make otelcontribcol && ./bin/otelcontribcol_darwin_arm64 --config test-str-trace.yml` in one window and `telemetrygen traces --otlp-insecure --traces 1` in another. The output is as shown: <details> <summary>CLI Output</summary> ``` Span #0 Trace ID : a389023abaa839283293ed323892389d Parent ID : e5c516b0c8942eab ID : 1914136d5f9ca838 Name : okey-dokey-0 Kind : Server Start time : 2025-10-29 18:59:03.312829 +0000 UTC End time : 2025-10-29 18:59:03.312952 +0000 UTC Status code : Unset Status message : Attributes: -> network.peer.address: Str(1.2.3.4) -> peer.service: Str(telemetrygen-client) Span #1 Trace ID : a389023abaa839283293ed323892389d Parent ID : ID : e5c516b0c8942eab Name : lets-go Kind : Client Start time : 2025-10-29 18:59:03.312829 +0000 UTC End time : 2025-10-29 18:59:03.312952 +0000 UTC Status code : Unset Status message : Attributes: -> network.peer.address: Str(1.2.3.4) -> peer.service: Str(telemetrygen-server) ``` </details> #### Documentation I don't currently see documentation for these functions, but I'm new here, maybe I'm missing something? Glad to update it --------- Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Dylan-M
pushed a commit
that referenced
this pull request
Mar 20, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Add `Base64Encode` OTTL converter function to encode strings into base64 format with support for multiple variants (`base64`, `base64-raw`, `base64-url`, `base64-raw-url`). This function addresses the need to handle characters not allowed by certain exporters like NATS Core. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#46071 <!--Describe what testing was performed and which tests were added.--> #### Testing Tested manually and added unit and e2e tests. Test config: ```yaml processors: transform: log_statements: - context: log statements: - set(attributes["encoded_default"], Base64Encode(attributes["plain_text"])) - set(attributes["encoded_base64_raw"], Base64Encode(attributes["plain_text"], "base64-raw")) - set(attributes["encoded_base64_url"], Base64Encode(attributes["plain_text"], "base64-url")) - set(attributes["encoded_base64_raw_url"], Base64Encode(attributes["plain_text"], "base64-raw-url")) ``` Test input: ```json {"plain_text": "test string"} {"plain_text": "hello world"} {"plain_text": "special chars: @#$%"} {"plain_text": "URL encoding test: https://example.com?param=value&other=123"} ``` Test result: ``` LogRecord #0 Body: Str({"plain_text": "test string"}) Attributes: -> log.file.name: Str(test_data.log) -> plain_text: Str(test string) -> encoded_default: Str(dGVzdCBzdHJpbmc=) -> encoded_base64_raw: Str(dGVzdCBzdHJpbmc) -> encoded_base64_url: Str(dGVzdCBzdHJpbmc=) -> encoded_base64_raw_url: Str(dGVzdCBzdHJpbmc) LogRecord #1 Body: Str({"plain_text": "hello world"}) Attributes: -> log.file.name: Str(test_data.log) -> plain_text: Str(hello world) -> encoded_default: Str(aGVsbG8gd29ybGQ=) -> encoded_base64_raw: Str(aGVsbG8gd29ybGQ) -> encoded_base64_url: Str(aGVsbG8gd29ybGQ=) -> encoded_base64_raw_url: Str(aGVsbG8gd29ybGQ) LogRecord open-telemetry#2 Body: Str({"plain_text": "special chars: @#$%"}) Attributes: -> log.file.name: Str(test_data.log) -> plain_text: Str(special chars: @#$%) -> encoded_default: Str(c3BlY2lhbCBjaGFyczogQCMkJQ==) -> encoded_base64_raw: Str(c3BlY2lhbCBjaGFyczogQCMkJQ) -> encoded_base64_url: Str(c3BlY2lhbCBjaGFyczogQCMkJQ==) -> encoded_base64_raw_url: Str(c3BlY2lhbCBjaGFyczogQCMkJQ) LogRecord open-telemetry#3 Body: Str({"plain_text": "URL encoding test: https://example.com?param=value&other=123"}) Attributes: -> log.file.name: Str(test_data.log) -> plain_text: Str(URL encoding test: https://example.com?param=value&other=123) -> encoded_default: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20/cGFyYW09dmFsdWUmb3RoZXI9MTIz) -> encoded_base64_raw: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20/cGFyYW09dmFsdWUmb3RoZXI9MTIz) -> encoded_base64_url: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20_cGFyYW09dmFsdWUmb3RoZXI9MTIz) -> encoded_base64_raw_url: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20_cGFyYW09dmFsdWUmb3RoZXI9MTIz) ``` <!--Describe the documentation added.--> #### Documentation Updated `README.md` with function documentation, usage examples, and supported variants. <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Dylan-M
pushed a commit
that referenced
this pull request
Apr 22, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Add support timeout setting for telemetrygen <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#47203 #### Testing Sending traces to a collector that has an artificial delay of `10s` before answering ``` ❯ go run . traces --traces 1 --timeout 5s --otlp-insecure 2026-04-01T17:29:31.673+0300 INFO channelz/trace.go:200 [core] [Channel #1] Channel Connectivity change to READY {"grpc_log": true} 2026/04/01 17:29:34 traces export: context deadline exceeded: rpc error: code = DeadlineExceeded desc = context deadline exceeded 2026-04-01T17:29:34.980+0300 INFO channelz/trace.go:200 [core] [Channel #1] Channel Connectivity change to SHUTDOWN {"grpc_log": true} ``` ``` ❯ go run . traces --traces 1 --timeout 15s --otlp-insecure 2026-04-01T17:30:42.046+0300 INFO channelz/trace.go:200 [core] [Channel #1] Channel Connectivity change to READY {"grpc_log": true} 2026-04-01T17:30:52.052+0300 INFO channelz/trace.go:200 [core] [Channel #1] Channel Connectivity change to SHUTDOWN {"grpc_log": true} ```
Dylan-M
pushed a commit
that referenced
this pull request
Apr 22, 2026
…pen-telemetry#45518) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description The `extract_percentile_metric` function creates a new Gauge metric from a Histogram or ExponentialHistogram by calculating the specified percentile value from the bucket counts. A metric will only be created if there is at least one data point. `percentile` is a float64 value between 0 and 100 representing the desired percentile to extract (e.g., 50 for median, 95 for p95, 99 for p99). `suffix` is an optional string that defines the suffix for the metric name. By default, it is set to `_p{percentile}` (e.g., `_p50`, `_p95`, `_p99`). <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Closes open-telemetry#44316 <!--Describe what testing was performed and which tests were added.--> #### Testing Included unit tests and tested manually with this configuration: ``` yaml receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 exporters: debug: verbosity: detailed sampling_initial: 10000 sampling_thereafter: 10000 processors: transform: error_mode: ignore metric_statements: - context: metric statements: - extract_percentile_metric(50.0) - extract_percentile_metric(95.0) - extract_percentile_metric(99.0, "_p99_custom") service: telemetry: metrics: level: none pipelines: metrics: receivers: [otlp] processors: [transform] exporters: - debug ``` tested with `telemetrygen` tool with params to generate regular histogram metrics: ``` ./bin/telemetrygen_darwin_arm64 metrics \ ok | 14:34:29 --otlp-insecure \ --otlp-endpoint localhost:4317 \ --metrics 1 \ --otlp-attributes 'service.name="histogram-service"' \ --metric-type Histogram \ --otlp-metric-name "http.server.duration" ``` Obtained output: ``` Metric #1 Descriptor: -> Name: http.server.duration_p50 -> Description: (p50) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:34:29.409727 +0000 UTC Timestamp: 2026-01-20 13:34:29.409727 +0000 UTC Value: 137.500000 Metric open-telemetry#2 Descriptor: -> Name: http.server.duration_p95 -> Description: (p95) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:34:29.409727 +0000 UTC Timestamp: 2026-01-20 13:34:29.409727 +0000 UTC Value: 750.000000 Metric open-telemetry#3 Descriptor: -> Name: http.server.duration_p99_custom -> Description: (p99) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:34:29.409727 +0000 UTC Timestamp: 2026-01-20 13:34:29.409727 +0000 UTC Value: 750.000000 # p99 is placed in last bucket which is [bucket_lower_bound, + Inf ]. Cannot interpolate with Inf values so it is necessary to use lowerbound (750) ``` Tested with Exponential histogram as well: ``` ./bin/telemetrygen_darwin_arm64 metrics \ ok | 14:42:11 --otlp-insecure \ --otlp-endpoint localhost:4317 \ --metrics 1 \ --otlp-attributes 'service.name="histogram-service"' \ --metric-type ExponentialHistogram \ --otlp-metric-name "http.server.duration" ``` and got the output: ``` Metric #1 Descriptor: -> Name: http.server.duration_p50 -> Description: (p50) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:42:11.599314 +0000 UTC Timestamp: 2026-01-20 13:42:11.599315 +0000 UTC Value: 545.301038 Metric open-telemetry#2 Descriptor: -> Name: http.server.duration_p95 -> Description: (p95) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:42:11.599314 +0000 UTC Timestamp: 2026-01-20 13:42:11.599315 +0000 UTC Value: 961.465253 Metric open-telemetry#3 Descriptor: -> Name: http.server.duration_p99_custom -> Description: (p99) -> Unit: -> DataType: Gauge NumberDataPoints #0 StartTimestamp: 2026-01-20 13:42:11.599314 +0000 UTC Timestamp: 2026-01-20 13:42:11.599315 +0000 UTC Value: 1024.000000 ``` <!--Describe the documentation added.--> #### Documentation Added proper documentation to transform processor `README.md`. <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Dylan-M
pushed a commit
that referenced
this pull request
Apr 22, 2026
…arsing in %Z field (open-telemetry#47767) #### Description Adds a new optional time_zone_locations field to TimeParser that maps timezone abbreviations to IANA location names. This allows correct parsing of log streams that contain timestamps with multiple timezone abbreviations (e.g. IST, PDT, NZST) in a single operator block. Changes: [time.go](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) — added [TimeZoneLocations map[string]string](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) field (mapstructure: time_zone_locations), resolveLocation() method, and a validation that rejects time_zone_locations when the layout contains no %Z/MST directive [time_test.go](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) — added [TestTimeZoneLocations](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html), [TestTimeZoneLocationsErrors](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html), and [TestUnmarshalTimeConfig/time_zone_locations](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) [timestamp.yaml](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) — added time_zone_locations unmarshal fixture [timestamp.md](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) — documented [location](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) and time_zone_locations fields; added multi-timezone example [time_parser.md](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) — added [location](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) and time_zone_locations to the configuration fields table #### Link to tracking issue Fixes [47594](open-telemetry#47594) #### Testing Unit tests added and verified existing and new tests are passing. **Manual testing:** **Test log lines used:** ``` Wed Aug 27 15:08:58 IST 2025 Log from India Wed Aug 20 14:08:48 CST 2025 Log from China Wed Jul 16 10:00:00 NZST 2025 Log from New Zealand ``` **Without time_zone_locations param added/old behaviour:** [collector-config.yaml](https://github.com/user-attachments/files/26901647/collector-config.yaml) timeout 15 ./otelcol-tz-test/otelcol-tz-test --config collector-config.yaml 2>&1 | grep -E "LogRecord|Timestamp:|Body:" || true LogRecord #0 ObservedTimestamp: 2026-04-20 14:11:36.028277 +0000 UTC Timestamp: 2025-08-27 09:38:58 +0000 UTC Body: Str(Wed Aug 27 15:08:58 IST 2025 Log from India) LogRecord #1 ObservedTimestamp: 2026-04-20 14:11:36.028279 +0000 UTC Timestamp: 1970-01-01 00:00:00 +0000 UTC Body: Str(Wed Aug 20 14:08:48 CST 2025 Log from China) LogRecord #0 ObservedTimestamp: 2026-04-20 14:11:36.628855 +0000 UTC Timestamp: 1970-01-01 00:00:00 +0000 UTC Body: Str(Wed Jul 16 10:00:00 NZST 2025 Log from New Zealand) NZST and CST are not parsed properly. **With time_zone_locations param configured:** [collector-config.yaml](https://github.com/user-attachments/files/26901658/collector-config.yaml) timeout 15 ./otelcol-tz-test/otelcol-tz-test --config collector-config.yaml 2>&1 | grep -E "LogRecord|Timestamp:|Body:" || true LogRecord #0 ObservedTimestamp: 2026-04-20 14:12:22.096579 +0000 UTC Timestamp: 2025-08-27 09:38:58 +0000 UTC Body: Str(Wed Aug 27 15:08:58 IST 2025 Log from India) LogRecord #1 ObservedTimestamp: 2026-04-20 14:12:22.096582 +0000 UTC Timestamp: 2025-08-20 06:08:48 +0000 UTC Body: Str(Wed Aug 20 14:08:48 CST 2025 Log from China) LogRecord #0 ObservedTimestamp: 2026-04-20 14:12:22.696974 +0000 UTC Timestamp: 2025-07-15 22:00:00 +0000 UTC Body: Str(Wed Jul 16 10:00:00 NZST 2025 Log from New Zealand) All timezone abbreviations are parsed properly into their respective UTC times. #### Documentation Updated [timestamp.md](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) and [time_parser.md](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to document the new time_zone_locations field and add a multi-timezone parsing example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Link to tracking issue
Fixes
Testing
Documentation