From 7150c5041c99ce1e98fc4726ae241a3ea3d85f7c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:33:36 +0000 Subject: [PATCH 01/28] Add zipkin_input_otel package for Zipkin trace collection Create new OTel input package for receiving Zipkin trace data via the OpenTelemetry Collector's zipkinreceiver. This is the first traces-type OTel input package in the repository. Package includes: - Zipkin receiver configuration with endpoint and parse_string_tags vars - Policy tests for default and custom variable configurations - System test with docker-compose using stream webhook to send Zipkin V2 JSON spans (all 4 upstream testdata samples) - Documentation with configuration, troubleshooting, and references Closes #17155 Co-authored-by: Mario Rodriguez Molins --- .github/CODEOWNERS | 1 + packages/zipkin_input_otel/LICENSE.txt | 93 +++++++++++++++++++ .../_dev/build/docs/README.md | 25 +++++ .../_dev/deploy/docker/docker-compose.yml | 14 +++ .../docker/sample_traces/zipkin_spans.ndjson | 4 + .../test/policy/test-default-vars.expected | 48 ++++++++++ .../_dev/test/policy/test-default-vars.yml | 1 + .../_dev/test/policy/test-default.expected | 48 ++++++++++ .../_dev/test/policy/test-default.yml | 3 + .../_dev/test/system/test-default-config.yml | 7 ++ .../agent/input/input.yml.hbs | 9 ++ packages/zipkin_input_otel/changelog.yml | 6 ++ packages/zipkin_input_otel/docs/README.md | 25 +++++ .../zipkin_input_otel/img/zipkin_otellogo.svg | 16 ++++ packages/zipkin_input_otel/manifest.yml | 46 +++++++++ 15 files changed, 346 insertions(+) create mode 100644 packages/zipkin_input_otel/LICENSE.txt create mode 100644 packages/zipkin_input_otel/_dev/build/docs/README.md create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-vars.yml create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default.yml create mode 100644 packages/zipkin_input_otel/_dev/test/system/test-default-config.yml create mode 100644 packages/zipkin_input_otel/agent/input/input.yml.hbs create mode 100644 packages/zipkin_input_otel/changelog.yml create mode 100644 packages/zipkin_input_otel/docs/README.md create mode 100644 packages/zipkin_input_otel/img/zipkin_otellogo.svg create mode 100644 packages/zipkin_input_otel/manifest.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d472b3032a9..3e4d6112688 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -534,6 +534,7 @@ /packages/zeek @elastic/integration-experience /packages/zerofox @elastic/security-service-integrations /packages/zeronetworks @elastic/security-service-integrations +/packages/zipkin_input_otel @elastic/ecosystem /packages/zookeeper @elastic/obs-infraobs-integrations /packages/zoom @elastic/security-service-integrations /packages/zscaler_zia @elastic/security-service-integrations diff --git a/packages/zipkin_input_otel/LICENSE.txt b/packages/zipkin_input_otel/LICENSE.txt new file mode 100644 index 00000000000..d317b57b294 --- /dev/null +++ b/packages/zipkin_input_otel/LICENSE.txt @@ -0,0 +1,93 @@ +Elastic License 2.0 + +URL: https://www.elastic.co/licensing/elastic-license + +## Acceptance + +By using the software, you agree to all of the terms and conditions below. + +## Copyright License + +The licensor grants you a non-exclusive, royalty-free, worldwide, +non-sublicensable, non-transferable license to use, copy, distribute, make +available, and prepare derivative works of the software, in each case subject to +the limitations and conditions below. + +## Limitations + +You may not provide the software to third parties as a hosted or managed +service, where the service provides users with access to any substantial set of +the features or functionality of the software. + +You may not move, change, disable, or circumvent the license key functionality +in the software, and you may not remove or obscure any functionality in the +software that is protected by the license key. + +You may not alter, remove, or obscure any licensing, copyright, or other notices +of the licensor in the software. Any use of the licensor's trademarks is subject +to applicable law. + +## Patents + +The licensor grants you a license, under any patent claims the licensor can +license, or becomes able to license, to make, have made, use, sell, offer for +sale, import and have imported the software, in each case subject to the +limitations and conditions in this license. This license does not cover any +patent claims that you cause to be infringed by modifications or additions to +the software. If you or your company make any written claim that the software +infringes or contributes to infringement of any patent, your patent license for +the software granted under these terms ends immediately. If your company makes +such a claim, your patent license ends immediately for work on behalf of your +company. + +## Notices + +You must ensure that anyone who gets a copy of any part of the software from you +also gets a copy of these terms. + +If you modify the software, you must include in any modified copies of the +software prominent notices stating that you have modified the software. + +## No Other Rights + +These terms do not imply any licenses other than those expressly granted in +these terms. + +## Termination + +If you use the software in violation of these terms, such use is not licensed, +and your licenses will automatically terminate. If the licensor provides you +with a notice of your violation, and you cease all violation of this license no +later than 30 days after you receive that notice, your licenses will be +reinstated retroactively. However, if you violate these terms after such +reinstatement, any additional violation of these terms will cause your licenses +to terminate automatically and permanently. + +## No Liability + +*As far as the law allows, the software comes as is, without any warranty or +condition, and the licensor will not be liable to you for any damages arising +out of these terms or the use or nature of the software, under any kind of +legal claim.* + +## Definitions + +The **licensor** is the entity offering these terms, and the **software** is the +software the licensor makes available under these terms, including any portion +of it. + +**you** refers to the individual or entity agreeing to these terms. + +**your company** is any legal entity, sole proprietorship, or other kind of +organization that you work for, plus all organizations that have control over, +are under the control of, or are under common control with that +organization. **control** means ownership of substantially all the assets of an +entity, or the power to direct its management and policies by vote, contract, or +otherwise. Control can be direct or indirect. + +**your licenses** are all the licenses granted to you for the software under +these terms. + +**use** means anything you do with the software requiring one of your licenses. + +**trademark** means trademarks, service marks, and similar rights. diff --git a/packages/zipkin_input_otel/_dev/build/docs/README.md b/packages/zipkin_input_otel/_dev/build/docs/README.md new file mode 100644 index 00000000000..1109c316a65 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/build/docs/README.md @@ -0,0 +1,25 @@ +# Zipkin OpenTelemetry Input Package + +## Overview +The Zipkin OpenTelemetry Input Package for Elastic enables collection of trace data from applications instrumented with [Zipkin](https://zipkin.io/) through OpenTelemetry protocols using the [zipkinreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver#zipkin-receiver). + +### How it works +This package receives Zipkin trace data (V1 and V2 JSON/Protobuf formats) by configuring the Zipkin receiver in the Input Package, which then gets applied to the zipkinreceiver present in the EDOT collector, which then forwards the data to Elastic Agent. The Elastic Agent processes and enriches the data before sending it to Elasticsearch for indexing and analysis. + +## Configuration + +| Setting | Description | Default | +|---|---|---| +| Endpoint | The `host:port` address to listen on for Zipkin spans | `localhost:9411` | +| Parse String Tags | Parse string tags/binary annotations into int/bool/float types | `false` | + +## Troubleshooting + +If you encounter issues: + +1. Verify the endpoint is accessible and not blocked by a firewall. +2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411/api/v2/spans`). +3. Check the Elastic Agent logs for any receiver errors. + +## Traces reference +For more details about the Zipkin receiver and its configuration options, refer to the [Zipkin Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver) in the upstream OpenTelemetry Collector repository. diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml new file mode 100644 index 00000000000..2b8ea2c0744 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -0,0 +1,14 @@ +version: '2.3' +services: + zipkin_input_otel: + image: docker.elastic.co/observability/stream:v0.20.0 + volumes: + - ./sample_traces:/sample_traces:ro + environment: + - STREAM_PROTOCOL=webhook + - STREAM_WEBHOOK_PROBE=false + - STREAM_ADDR=http://elastic-agent:9411/api/v2/spans + - STREAM_WEBHOOK_HEADER=Content-Type=application/json + - STREAM_START_SIGNAL=SIGHUP + - STREAM_DELAY=10s + command: log /sample_traces/zipkin_spans.ndjson diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson new file mode 100644 index 00000000000..aa1c0071b7b --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson @@ -0,0 +1,4 @@ +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"true"}}] +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"Non-basic error message"}}] diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected new file mode 100644 index 00000000000..8f100dc2ee3 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected @@ -0,0 +1,48 @@ +connectors: + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc +processors: + transform/componentid-0: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkin_input_otel.zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: localhost:9411 + parse_string_tags: false +secret_references: [] +service: + pipelines: + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.yml b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.yml new file mode 100644 index 00000000000..72b4ca320df --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.yml @@ -0,0 +1 @@ +vars: ~ diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected new file mode 100644 index 00000000000..c361e40e176 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected @@ -0,0 +1,48 @@ +connectors: + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc +processors: + transform/componentid-0: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkin_input_otel.zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: 0.0.0.0:9411 + parse_string_tags: true +secret_references: [] +service: + pipelines: + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default.yml b/packages/zipkin_input_otel/_dev/test/policy/test-default.yml new file mode 100644 index 00000000000..5893fe8d4fb --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default.yml @@ -0,0 +1,3 @@ +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: true diff --git a/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml new file mode 100644 index 00000000000..91d5795af5b --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml @@ -0,0 +1,7 @@ +service: zipkin_input_otel +service_notify_signal: SIGHUP +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: false +assert: + hit_count: 12 diff --git a/packages/zipkin_input_otel/agent/input/input.yml.hbs b/packages/zipkin_input_otel/agent/input/input.yml.hbs new file mode 100644 index 00000000000..28006059dc8 --- /dev/null +++ b/packages/zipkin_input_otel/agent/input/input.yml.hbs @@ -0,0 +1,9 @@ +receivers: + zipkin: + endpoint: {{endpoint}} + parse_string_tags: {{parse_string_tags}} + +service: + pipelines: + traces: + receivers: [zipkin] diff --git a/packages/zipkin_input_otel/changelog.yml b/packages/zipkin_input_otel/changelog.yml new file mode 100644 index 00000000000..24dd98004ce --- /dev/null +++ b/packages/zipkin_input_otel/changelog.yml @@ -0,0 +1,6 @@ +# newer versions go on top +- version: "0.1.0" + changes: + - description: Initial draft of the package + type: enhancement + link: https://github.com/elastic/integrations/pull/17155 diff --git a/packages/zipkin_input_otel/docs/README.md b/packages/zipkin_input_otel/docs/README.md new file mode 100644 index 00000000000..1109c316a65 --- /dev/null +++ b/packages/zipkin_input_otel/docs/README.md @@ -0,0 +1,25 @@ +# Zipkin OpenTelemetry Input Package + +## Overview +The Zipkin OpenTelemetry Input Package for Elastic enables collection of trace data from applications instrumented with [Zipkin](https://zipkin.io/) through OpenTelemetry protocols using the [zipkinreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver#zipkin-receiver). + +### How it works +This package receives Zipkin trace data (V1 and V2 JSON/Protobuf formats) by configuring the Zipkin receiver in the Input Package, which then gets applied to the zipkinreceiver present in the EDOT collector, which then forwards the data to Elastic Agent. The Elastic Agent processes and enriches the data before sending it to Elasticsearch for indexing and analysis. + +## Configuration + +| Setting | Description | Default | +|---|---|---| +| Endpoint | The `host:port` address to listen on for Zipkin spans | `localhost:9411` | +| Parse String Tags | Parse string tags/binary annotations into int/bool/float types | `false` | + +## Troubleshooting + +If you encounter issues: + +1. Verify the endpoint is accessible and not blocked by a firewall. +2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411/api/v2/spans`). +3. Check the Elastic Agent logs for any receiver errors. + +## Traces reference +For more details about the Zipkin receiver and its configuration options, refer to the [Zipkin Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver) in the upstream OpenTelemetry Collector repository. diff --git a/packages/zipkin_input_otel/img/zipkin_otellogo.svg b/packages/zipkin_input_otel/img/zipkin_otellogo.svg new file mode 100644 index 00000000000..3d7dd8c14bd --- /dev/null +++ b/packages/zipkin_input_otel/img/zipkin_otellogo.svg @@ -0,0 +1,16 @@ + + + Layer 1 + + + + + + + + + + + + + diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml new file mode 100644 index 00000000000..36022d8b3b5 --- /dev/null +++ b/packages/zipkin_input_otel/manifest.yml @@ -0,0 +1,46 @@ +format_version: 3.5.0 +name: zipkin_input_otel +title: "Zipkin OpenTelemetry Input Package" +version: "0.1.0" +source: + license: "Elastic-2.0" +description: "Collect Zipkin traces using OpenTelemetry Collector" +type: input +categories: + - observability + - opentelemetry +conditions: + kibana: + version: "^9.2.0" + elastic: + subscription: "basic" +icons: + - src: /img/zipkin_otellogo.svg + title: Zipkin OTel logo + size: 32x32 + type: image/svg+xml +policy_templates: + - name: zipkinreceiver + type: traces + title: Zipkin OpenTelemetry Input + description: Collect Zipkin traces using OpenTelemetry Collector + input: otelcol + template_path: input.yml.hbs + vars: + - name: endpoint + type: text + title: Endpoint + required: true + description: The host:port address to listen on for Zipkin spans. + default: localhost:9411 + show_user: true + - name: parse_string_tags + type: bool + title: Parse String Tags + required: false + description: If enabled, string tags/binary annotations will be parsed into int/bool/float types. + default: false + show_user: true +owner: + github: elastic/ecosystem + type: elastic From bfeeaabb84220885fe490bd9257e73eeeb0d046a Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 12:17:36 +0000 Subject: [PATCH 02/28] Update zipkin_otellogo.svg with proper Zipkin + OTel combined logo Replace placeholder logo with a proper combined SVG that includes: - Zipkin magnifying glass icon (from official vectorlogo.zone sources) in the main area using dark color (#1a1a1a) - OpenTelemetry wrench icon in the bottom-right corner using the standard OTel brand colors (orange #f5a800, blue #425cc7), following the same pattern as other _input_otel packages Logo is 64x64px SVG with transparent background. Co-authored-by: Mario Rodriguez Molins --- .../zipkin_input_otel/img/zipkin_otellogo.svg | 22 ++++++++----------- packages/zipkin_input_otel/manifest.yml | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/packages/zipkin_input_otel/img/zipkin_otellogo.svg b/packages/zipkin_input_otel/img/zipkin_otellogo.svg index 3d7dd8c14bd..eab75c08fec 100644 --- a/packages/zipkin_input_otel/img/zipkin_otellogo.svg +++ b/packages/zipkin_input_otel/img/zipkin_otellogo.svg @@ -1,16 +1,12 @@ - - - Layer 1 - - - - - - + + + + + + - - - + + + - diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 36022d8b3b5..47524e15698 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -17,7 +17,7 @@ conditions: icons: - src: /img/zipkin_otellogo.svg title: Zipkin OTel logo - size: 32x32 + size: 64x64 type: image/svg+xml policy_templates: - name: zipkinreceiver From 964f910d3e1e2f01e161c540168cd1738002a6da Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 4 Feb 2026 13:34:56 +0100 Subject: [PATCH 03/28] Update changelog link. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- packages/zipkin_input_otel/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zipkin_input_otel/changelog.yml b/packages/zipkin_input_otel/changelog.yml index 24dd98004ce..ed6aabd03e3 100644 --- a/packages/zipkin_input_otel/changelog.yml +++ b/packages/zipkin_input_otel/changelog.yml @@ -3,4 +3,4 @@ changes: - description: Initial draft of the package type: enhancement - link: https://github.com/elastic/integrations/pull/17155 + link: https://github.com/elastic/integrations/pull/17226 From baab44612b5066beea4ebefb176fcf9ef3a97e38 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 12:41:32 +0000 Subject: [PATCH 04/28] Update zipkin_otellogo.svg with official Zipkin logo from openzipkin repo Use the official Zipkin logo PNG from openzipkin/zipkin repository (zipkin-lens/public/static/media/zipkin-logo.png) embedded as base64, combined with the OpenTelemetry vector icon in the bottom-right corner. The SVG is 64x64px with transparent background. Co-authored-by: Mario Rodriguez Molins --- .../zipkin_input_otel/img/zipkin_otellogo.svg | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/zipkin_input_otel/img/zipkin_otellogo.svg b/packages/zipkin_input_otel/img/zipkin_otellogo.svg index eab75c08fec..c65187dd75d 100644 --- a/packages/zipkin_input_otel/img/zipkin_otellogo.svg +++ b/packages/zipkin_input_otel/img/zipkin_otellogo.svg @@ -1,12 +1,13 @@ - - - - - - - - - - + + + + + + + + + + + From 177a3eee0eda5147c56ae0eeae1f60299ee89e60 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 4 Feb 2026 16:23:35 +0100 Subject: [PATCH 05/28] Update system test to split the sample traces files --- .../_dev/deploy/docker/docker-compose.yml | 7 ++++--- .../sample_traces/{zipkin_spans.ndjson => sample1.json} | 3 --- .../_dev/deploy/docker/sample_traces/sample2.json | 1 + .../_dev/deploy/docker/sample_traces/sample3.json | 1 + .../_dev/deploy/docker/sample_traces/sample4.json | 1 + .../_dev/test/system/test-default-config.yml | 3 ++- 6 files changed, 9 insertions(+), 7 deletions(-) rename packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/{zipkin_spans.ndjson => sample1.json} (76%) create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index 2b8ea2c0744..15899cf3d84 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -7,8 +7,9 @@ services: environment: - STREAM_PROTOCOL=webhook - STREAM_WEBHOOK_PROBE=false - - STREAM_ADDR=http://elastic-agent:9411/api/v2/spans - STREAM_WEBHOOK_HEADER=Content-Type=application/json + # - STREAM_ADDR=http://elastic-agent:9411/api/v2/spans + - STREAM_ADDR=http://elastic-agent:9411 - STREAM_START_SIGNAL=SIGHUP - - STREAM_DELAY=10s - command: log /sample_traces/zipkin_spans.ndjson + - STREAM_DELAY=5s + command: log /sample_traces/sample*.json diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json similarity index 76% rename from packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson rename to packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json index aa1c0071b7b..f092b1568bc 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/zipkin_spans.ndjson +++ b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json @@ -1,4 +1 @@ [{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"true"}}] -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"Non-basic error message"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json new file mode 100644 index 00000000000..f84d9929809 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json @@ -0,0 +1 @@ +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json new file mode 100644 index 00000000000..7a45653580e --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json @@ -0,0 +1 @@ +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"true"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json new file mode 100644 index 00000000000..f60c379d077 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json @@ -0,0 +1 @@ +[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"Non-basic error message"}}] diff --git a/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml index 91d5795af5b..8faa214c87d 100644 --- a/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml +++ b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml @@ -4,4 +4,5 @@ vars: endpoint: "0.0.0.0:9411" parse_string_tags: false assert: - hit_count: 12 + # hit_count: 12 + hit_count: 9 From 1fc759ee1c9682b330f03d357d4c4094ef6ece6d Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 18 Feb 2026 12:43:43 +0100 Subject: [PATCH 06/28] Update zipkin logo with otel logo Ensure that the zipkin logo has a size of 32x32. --- .../img/zipkin_otel_logo.svg | 35 +++++++++++++++++++ .../zipkin_input_otel/img/zipkin_otellogo.svg | 13 ------- packages/zipkin_input_otel/manifest.yml | 4 +-- 3 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 packages/zipkin_input_otel/img/zipkin_otel_logo.svg delete mode 100644 packages/zipkin_input_otel/img/zipkin_otellogo.svg diff --git a/packages/zipkin_input_otel/img/zipkin_otel_logo.svg b/packages/zipkin_input_otel/img/zipkin_otel_logo.svg new file mode 100644 index 00000000000..42cf49765b2 --- /dev/null +++ b/packages/zipkin_input_otel/img/zipkin_otel_logo.svg @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/packages/zipkin_input_otel/img/zipkin_otellogo.svg b/packages/zipkin_input_otel/img/zipkin_otellogo.svg deleted file mode 100644 index c65187dd75d..00000000000 --- a/packages/zipkin_input_otel/img/zipkin_otellogo.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 47524e15698..3388dc53bdd 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -15,9 +15,9 @@ conditions: elastic: subscription: "basic" icons: - - src: /img/zipkin_otellogo.svg + - src: /img/zipkin_otel_logo.svg title: Zipkin OTel logo - size: 64x64 + size: 32x32 type: image/svg+xml policy_templates: - name: zipkinreceiver From e1e72c9c99c0eb5541d1385f882a91236be08e97 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 18 Feb 2026 17:29:17 +0100 Subject: [PATCH 07/28] Set a new Golang script to post JSON files to zipkin --- .../_dev/deploy/docker/docker-compose.yml | 15 +- .../_dev/deploy/docker/source/Dockerfile | 10 ++ .../_dev/deploy/docker/source/go.mod | 3 + .../_dev/deploy/docker/source/main.go | 138 ++++++++++++++++++ 4 files changed, 157 insertions(+), 9 deletions(-) create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod create mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/main.go diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index 15899cf3d84..bb9ba909981 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -1,15 +1,12 @@ version: '2.3' services: zipkin_input_otel: - image: docker.elastic.co/observability/stream:v0.20.0 + build: + context: ./source + dockerfile: Dockerfile volumes: - ./sample_traces:/sample_traces:ro environment: - - STREAM_PROTOCOL=webhook - - STREAM_WEBHOOK_PROBE=false - - STREAM_WEBHOOK_HEADER=Content-Type=application/json - # - STREAM_ADDR=http://elastic-agent:9411/api/v2/spans - - STREAM_ADDR=http://elastic-agent:9411 - - STREAM_START_SIGNAL=SIGHUP - - STREAM_DELAY=5s - command: log /sample_traces/sample*.json + - ZIPKIN_ENDPOINT=http://elastic-agent:9411 + - TRACES_DIR=/sample_traces + - SEND_DELAY=5s diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile b/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile new file mode 100644 index 00000000000..dabcb405a06 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile @@ -0,0 +1,10 @@ +# Build stage +FROM golang:1.21-alpine AS builder +WORKDIR /app +COPY go.mod main.go . +RUN go build -o send-zipkin-traces . + +# Runtime stage +FROM alpine:3.18 +COPY --from=builder /app/send-zipkin-traces /send-zipkin-traces +ENTRYPOINT ["/send-zipkin-traces"] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod b/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod new file mode 100644 index 00000000000..f94e96e782d --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod @@ -0,0 +1,3 @@ +module zipkin-trace-sender + +go 1.21 diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go new file mode 100644 index 00000000000..ecd8a6266c7 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go @@ -0,0 +1,138 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +// zipkin-trace-sender sends sample trace JSON files to a Zipkin endpoint on SIGHUP. +// It treats HTTP 200 and 202 as success (unlike the stream container which fails on 202). +package main + +import ( + "bytes" + "context" + "crypto/tls" + "fmt" + "log" + "net/http" + "net/url" + "os" + "os/signal" + "path/filepath" + "strings" + "syscall" + "time" +) + +const ( + defaultEndpoint = "http://elastic-agent:9411" + defaultTracesDir = "/sample_traces" + spansPath = "/api/v2/spans" + + defaultTimeout = 5 * time.Second +) + +func main() { + ctx := context.Background() + endpoint := getEnv("ZIPKIN_ENDPOINT", defaultEndpoint) + endpoint = normalizeEndpoint(endpoint) + spansURL := endpoint + spansPath + + tracesDir := getEnv("TRACES_DIR", defaultTracesDir) + + sendDelay := time.Duration(0) + if d := getEnv("SEND_DELAY", ""); d != "" { + var err error + sendDelay, err = time.ParseDuration(d) + if err != nil { + log.Printf("invalid SEND_DELAY %q: %v; using 0", d, err) + } + } + + ctx, stop := signal.NotifyContext(ctx, syscall.SIGHUP) + defer stop() + + log.Printf("zipkin-trace-sender: endpoint=%s traces_dir=%s send_delay=%s; waiting for SIGHUP", spansURL, tracesDir, sendDelay) + + <-ctx.Done() + + if sendDelay > 0 { + log.Printf("waiting for %s before tearing down...", sendDelay) + select { + case <-time.After(sendDelay): + case <-ctx.Done(): + } + } + + if err := sendTraces(spansURL, tracesDir); err != nil { + log.Printf("send failed: %v", err) + os.Exit(1) + } + log.Printf("send completed successfully") +} + +func normalizeEndpoint(s string) string { + s = strings.TrimSpace(s) + if s == "" { + return defaultEndpoint + } + if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") { + s = "http://" + s + } + u, err := url.Parse(s) + if err != nil { + return s + } + u.Path = "" + u.RawPath = "" + u.RawQuery = "" + return strings.TrimSuffix(u.String(), "/") +} + +func getEnv(key, defaultValue string) string { + if v := os.Getenv(key); v != "" { + return v + } + return defaultValue +} + +func sendTraces(spansURL, tracesDir string) error { + pattern := filepath.Join(tracesDir, "sample*.json") + matches, err := filepath.Glob(pattern) + if err != nil { + return fmt.Errorf("glob %s: %w", pattern, err) + } + if len(matches) == 0 { + log.Printf("no files matched %s", pattern) + return nil + } + + client := &http.Client{ + Timeout: defaultTimeout, + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: false, + }, + }, + } + + for _, path := range matches { + data, err := os.ReadFile(path) + if err != nil { + return fmt.Errorf("read %s: %w", path, err) + } + + resp, err := client.Post(spansURL, "application/json", bytes.NewReader(data)) + if err != nil { + return fmt.Errorf("POST %s: %w", path, err) + } + defer resp.Body.Close() + + // Zipkin returns 202 for accepted traces + // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/a13d183f72cd20c2c705ec63cb5180ddb3d9b751/receiver/zipkinreceiver/trace_receiver.go#L240-L246 + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { + return fmt.Errorf("POST %s: status %d", path, resp.StatusCode) + } + log.Printf("posted %s -> %d", path, resp.StatusCode) + } + + return nil +} From 10dc7df5f018c33593b3a9a331bc6b2b9658e2e4 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 18 Feb 2026 17:58:02 +0100 Subject: [PATCH 08/28] Set minimum kibana version --- packages/zipkin_input_otel/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 3388dc53bdd..b3912987d90 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -11,7 +11,7 @@ categories: - opentelemetry conditions: kibana: - version: "^9.2.0" + version: "^9.4.0" elastic: subscription: "basic" icons: From 8a7e95a9579e48ac49895e287bf93d9235eeec92 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 18 Feb 2026 18:32:12 +0100 Subject: [PATCH 09/28] Update docker-compose.yml with TODO regarding zipkin_input_otel service compatibility --- .../zipkin_input_otel/_dev/deploy/docker/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index bb9ba909981..aea73cf2028 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -1,6 +1,9 @@ version: '2.3' services: zipkin_input_otel: + // TODO Currently docker.elastic.co/observability/stream:v0.20.0 cannot be used + // because it does not accept 202 responses as success. + // Related issue: https://github.com/elastic/stream/issues/193 build: context: ./source dockerfile: Dockerfile From 7acdfa7a323732f178fcb1d673541619095844eb Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 19 Feb 2026 13:01:30 +0100 Subject: [PATCH 10/28] Fix comments in dockerfile --- .../zipkin_input_otel/_dev/deploy/docker/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index aea73cf2028..da9f18e79f5 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -1,9 +1,9 @@ version: '2.3' services: zipkin_input_otel: - // TODO Currently docker.elastic.co/observability/stream:v0.20.0 cannot be used - // because it does not accept 202 responses as success. - // Related issue: https://github.com/elastic/stream/issues/193 + # TODO Currently docker.elastic.co/observability/stream:v0.20.0 cannot be used + # because it does not accept 202 responses as success. + # Related issue: https://github.com/elastic/stream/issues/193 build: context: ./source dockerfile: Dockerfile From 777175ad3c0c583699877956cbf84d6ad9a2cc69 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 19 Feb 2026 13:16:10 +0100 Subject: [PATCH 11/28] Refactor trace sending logic in test script --- .../_dev/deploy/docker/source/main.go | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go index ecd8a6266c7..4191ddc87e5 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go +++ b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go @@ -115,24 +115,34 @@ func sendTraces(spansURL, tracesDir string) error { } for _, path := range matches { - data, err := os.ReadFile(path) - if err != nil { - return fmt.Errorf("read %s: %w", path, err) + if err := sendTraceFile(client, spansURL, path); err != nil { + return err } + } - resp, err := client.Post(spansURL, "application/json", bytes.NewReader(data)) - if err != nil { - return fmt.Errorf("POST %s: %w", path, err) - } - defer resp.Body.Close() + return nil +} - // Zipkin returns 202 for accepted traces - // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/a13d183f72cd20c2c705ec63cb5180ddb3d9b751/receiver/zipkinreceiver/trace_receiver.go#L240-L246 - if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { - return fmt.Errorf("POST %s: status %d", path, resp.StatusCode) - } - log.Printf("posted %s -> %d", path, resp.StatusCode) +// sendTraceFile reads one trace file and POSTs it to the Zipkin spans endpoint. +// It is a separate function so that defer resp.Body.Close() runs at the end of +// each call, not at the end of the loop. +func sendTraceFile(client *http.Client, spansURL, path string) error { + data, err := os.ReadFile(path) + if err != nil { + return fmt.Errorf("read %s: %w", path, err) + } + + resp, err := client.Post(spansURL, "application/json", bytes.NewReader(data)) + if err != nil { + return fmt.Errorf("POST %s: %w", path, err) } + defer resp.Body.Close() + // Zipkin returns 202 for accepted traces + // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/a13d183f72cd20c2c705ec63cb5180ddb3d9b751/receiver/zipkinreceiver/trace_receiver.go#L240-L246 + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { + return fmt.Errorf("POST %s: status %d", path, resp.StatusCode) + } + log.Printf("posted %s -> %d", path, resp.StatusCode) return nil } From b7cbbed98cab64465d571af236b8061628d57470 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 19 Feb 2026 16:03:11 +0100 Subject: [PATCH 12/28] Allow to set the pattern to read for the samples as environment variable Modified docker-compose.yml to replace TRACES_DIR with TRACES_PATTERN for better flexibility in trace file selection.n. --- .../_dev/deploy/docker/docker-compose.yml | 2 +- .../_dev/deploy/docker/source/main.go | 20 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index da9f18e79f5..ff8d6225a03 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -11,5 +11,5 @@ services: - ./sample_traces:/sample_traces:ro environment: - ZIPKIN_ENDPOINT=http://elastic-agent:9411 - - TRACES_DIR=/sample_traces + - TRACES_PATTERN=/sample_traces/sample*.json - SEND_DELAY=5s diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go index 4191ddc87e5..c8e4d8b299b 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go +++ b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go @@ -23,9 +23,10 @@ import ( ) const ( - defaultEndpoint = "http://elastic-agent:9411" - defaultTracesDir = "/sample_traces" - spansPath = "/api/v2/spans" + defaultEndpoint = "http://elastic-agent:9411" + defaultTracesDir = "/sample_traces" + defaultTracesGlob = "sample*.json" + spansPath = "/api/v2/spans" defaultTimeout = 5 * time.Second ) @@ -36,7 +37,11 @@ func main() { endpoint = normalizeEndpoint(endpoint) spansURL := endpoint + spansPath - tracesDir := getEnv("TRACES_DIR", defaultTracesDir) + tracesPattern := getEnv("TRACES_PATTERN", "") + if tracesPattern == "" { + tracesDir := getEnv("TRACES_DIR", defaultTracesDir) + tracesPattern = filepath.Join(tracesDir, defaultTracesGlob) + } sendDelay := time.Duration(0) if d := getEnv("SEND_DELAY", ""); d != "" { @@ -50,7 +55,7 @@ func main() { ctx, stop := signal.NotifyContext(ctx, syscall.SIGHUP) defer stop() - log.Printf("zipkin-trace-sender: endpoint=%s traces_dir=%s send_delay=%s; waiting for SIGHUP", spansURL, tracesDir, sendDelay) + log.Printf("zipkin-trace-sender: endpoint=%s traces_pattern=%s send_delay=%s; waiting for SIGHUP", spansURL, tracesPattern, sendDelay) <-ctx.Done() @@ -62,7 +67,7 @@ func main() { } } - if err := sendTraces(spansURL, tracesDir); err != nil { + if err := sendTraces(spansURL, tracesPattern); err != nil { log.Printf("send failed: %v", err) os.Exit(1) } @@ -94,8 +99,7 @@ func getEnv(key, defaultValue string) string { return defaultValue } -func sendTraces(spansURL, tracesDir string) error { - pattern := filepath.Join(tracesDir, "sample*.json") +func sendTraces(spansURL, pattern string) error { matches, err := filepath.Glob(pattern) if err != nil { return fmt.Errorf("glob %s: %w", pattern, err) From 0856ba048e92c26f2257a9fc3f4ad5697a810c4b Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 20 Feb 2026 12:36:51 +0100 Subject: [PATCH 13/28] Refactor docker-compose setup and add trace sending script Updated docker-compose.yml to introduce a new service for generating traces and a backend service. Removed sample trace files and added a script to send traces to the backend. Adjusted test configuration to reflect changes in service structure and increased minimum hit count for assertions. --- .../_dev/deploy/docker/docker-compose.yml | 26 ++++++++++-------- .../deploy/docker/sample_traces/sample1.json | 1 - .../deploy/docker/sample_traces/sample2.json | 1 - .../deploy/docker/sample_traces/sample3.json | 1 - .../deploy/docker/sample_traces/sample4.json | 1 - .../_dev/deploy/docker/scripts/send_traces.sh | 27 +++++++++++++++++++ .../_dev/test/system/test-default-config.yml | 6 ++--- 7 files changed, 44 insertions(+), 19 deletions(-) delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json create mode 100755 packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index ff8d6225a03..b9b744a3d45 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -1,15 +1,19 @@ version: '2.3' services: - zipkin_input_otel: - # TODO Currently docker.elastic.co/observability/stream:v0.20.0 cannot be used - # because it does not accept 202 responses as success. - # Related issue: https://github.com/elastic/stream/issues/193 - build: - context: ./source - dockerfile: Dockerfile + generate_traces: + image: curlimages/curl + environment: + - TARGET_URL=http://backend:9000 volumes: - - ./sample_traces:/sample_traces:ro + - ./scripts/send_traces.sh:/send_traces.sh + command: ["sh", "/send_traces.sh"] + depends_on: + backend: + condition: service_healthy + backend: + image: ghcr.io/openzipkin/brave-example:armeria + entrypoint: start-backend + ports: + - 9000:9000 environment: - - ZIPKIN_ENDPOINT=http://elastic-agent:9411 - - TRACES_PATTERN=/sample_traces/sample*.json - - SEND_DELAY=5s + - ZIPKIN_BASEURL=http://elastic-agent:9411 diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json deleted file mode 100644 index f092b1568bc..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample1.json +++ /dev/null @@ -1 +0,0 @@ -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}},{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"serviceName":"frontend","ipv6":"7::0.128.128.127"},"remoteEndpoint":{"serviceName":"backend","ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json deleted file mode 100644 index f84d9929809..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample2.json +++ /dev/null @@ -1 +0,0 @@ -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json deleted file mode 100644 index 7a45653580e..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample3.json +++ /dev/null @@ -1 +0,0 @@ -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"true"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json b/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json deleted file mode 100644 index f60c379d077..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/sample_traces/sample4.json +++ /dev/null @@ -1 +0,0 @@ -[{"traceId":"4d1e00c0db9010db86154a4ba6e91385","parentId":"86154a4ba6e91385","id":"4d1e00c0db9010db","kind":"CLIENT","name":"get","timestamp":1472470996199000,"duration":207000,"localEndpoint":{"ipv6":"7::0.128.128.127"},"remoteEndpoint":{"ipv4":"192.168.99.101","port":9000},"annotations":[{"timestamp":1472470996238000,"value":"foo"},{"timestamp":1472470996403000,"value":"bar"}],"tags":{"http.path":"/api","clnt/finagle.version":"6.45.0","error":"Non-basic error message"}}] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh new file mode 100755 index 00000000000..419f37968db --- /dev/null +++ b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +set -ex + +TARGET_URL=${TARGET_URL:-http://backend:9000} + +# NOTE: it cannot be done using SIGHUP signal, since the backend container is also +# killed and the traces would not be sent to the elastic-agent container. + +# Wait for the elastic-agent container to be ready with the corresponding +# agent policy assigned +sleep 20 + +echo "Sending traces to ${TARGET_URL}/api" +i=0 +while true; do + echo "Trigger query ${i}" + # Force creating traces containing requests with errors + # The following curl command will fail with a 404 error per the backend code. + # FIXME: Currently, the traces generated by the backend with errors cause that system tests fail. + # curl "${TARGET_URL}"; sleep 1; + + ## Create traces without any errors + # curl ${TARGET_URL}/api will return a 200 status code + curl -s -o /dev/null "${TARGET_URL}/api"; sleep 1; + i=$((i+1)) +done diff --git a/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml index 8faa214c87d..2751f845da5 100644 --- a/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml +++ b/packages/zipkin_input_otel/_dev/test/system/test-default-config.yml @@ -1,8 +1,6 @@ -service: zipkin_input_otel -service_notify_signal: SIGHUP +service: backend vars: endpoint: "0.0.0.0:9411" parse_string_tags: false assert: - # hit_count: 12 - hit_count: 9 + min_count: 20 From b1d50e987cbf9d84b4511283f25ee571bc415e20 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 20 Feb 2026 13:52:12 +0100 Subject: [PATCH 14/28] Update policy tests --- .../_dev/test/policy/test-default-vars.expected | 11 ++++++++++- .../_dev/test/policy/test-default.expected | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected index 8f100dc2ee3..11e87e9f50c 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected @@ -19,13 +19,22 @@ output_permissions: privileges: - auto_configure - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc processors: transform/componentid-0: trace_statements: - context: span statements: - set(attributes["data_stream.type"], "traces") - - set(attributes["data_stream.dataset"], "zipkin_input_otel.zipkinreceiver") + - set(attributes["data_stream.dataset"], "zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") - set(attributes["data_stream.namespace"], "ep") receivers: zipkin/componentid-0: diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected index c361e40e176..9bfab820c31 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-default.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected @@ -19,13 +19,22 @@ output_permissions: privileges: - auto_configure - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc processors: transform/componentid-0: trace_statements: - context: span statements: - set(attributes["data_stream.type"], "traces") - - set(attributes["data_stream.dataset"], "zipkin_input_otel.zipkinreceiver") + - set(attributes["data_stream.dataset"], "zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") - set(attributes["data_stream.namespace"], "ep") receivers: zipkin/componentid-0: From 1548262099837dea2967e6a82dde19c38f246748 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 20 Feb 2026 14:41:36 +0100 Subject: [PATCH 15/28] Add TLS configuration options to Zipkin input manifest and update related test files --- .../_dev/test/policy/test-tls.expected | 66 +++++++++++++++ .../_dev/test/policy/test-tls.yml | 13 +++ .../agent/input/input.yml.hbs | 29 ++++++- packages/zipkin_input_otel/manifest.yml | 83 +++++++++++++++++++ 4 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-tls.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-tls.yml diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected new file mode 100644 index 00000000000..98fc9055b5b --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected @@ -0,0 +1,66 @@ +connectors: + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc +processors: + transform/componentid-0: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: 0.0.0.0:9411 + parse_string_tags: true + tls: + ca_file: /path/to/ca.crt + cert_file: /path/to/client.crt + include_system_ca_certs_pool: true + insecure: false + key_file: /path/to/client.key + max_version: "1.3" + min_version: "1.2" + server_name_override: zipkin.example.com +secret_references: [] +service: + pipelines: + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml b/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml new file mode 100644 index 00000000000..777857fabd4 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml @@ -0,0 +1,13 @@ +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: true + tls_enabled: true + tls_insecure: false + tls_insecure_skip_verify: false + tls_ca_file: "/path/to/ca.crt" + tls_cert_file: "/path/to/client.crt" + tls_key_file: "/path/to/client.key" + tls_server_name_override: "zipkin.example.com" + tls_min_version: "1.2" + tls_max_version: "1.3" + tls_include_system_ca_certs_pool: true diff --git a/packages/zipkin_input_otel/agent/input/input.yml.hbs b/packages/zipkin_input_otel/agent/input/input.yml.hbs index 28006059dc8..721ef84c9ee 100644 --- a/packages/zipkin_input_otel/agent/input/input.yml.hbs +++ b/packages/zipkin_input_otel/agent/input/input.yml.hbs @@ -2,7 +2,34 @@ receivers: zipkin: endpoint: {{endpoint}} parse_string_tags: {{parse_string_tags}} - +{{#if tls_enabled}} + tls: + insecure: {{tls_insecure}} +{{#if tls_insecure_skip_verify}} + insecure_skip_verify: {{tls_insecure_skip_verify}} +{{/if}} +{{#if tls_ca_file}} + ca_file: {{tls_ca_file}} +{{/if}} +{{#if tls_cert_file}} + cert_file: {{tls_cert_file}} +{{/if}} +{{#if tls_key_file}} + key_file: {{tls_key_file}} +{{/if}} +{{#if tls_server_name_override}} + server_name_override: {{tls_server_name_override}} +{{/if}} +{{#if tls_min_version}} + min_version: "{{tls_min_version}}" +{{/if}} +{{#if tls_max_version}} + max_version: "{{tls_max_version}}" +{{/if}} +{{#if tls_include_system_ca_certs_pool}} + include_system_ca_certs_pool: {{tls_include_system_ca_certs_pool}} +{{/if}} +{{/if}} service: pipelines: traces: diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index b3912987d90..07e56a875a6 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -41,6 +41,89 @@ policy_templates: description: If enabled, string tags/binary annotations will be parsed into int/bool/float types. default: false show_user: true + # TLS settings + - name: tls_enabled + type: bool + required: false + title: Enable TLS Configuration + description: Enable TLS configuration for connecting to the server. + default: false + show_user: true + - name: tls_insecure + type: bool + required: false + title: Disable TLS + description: Whether to disable client transport security for the connection. Set to false to enable TLS. + default: true + show_user: false + - name: tls_insecure_skip_verify + type: bool + required: false + title: Skip TLS Verification + description: Whether to skip verifying the server certificate when TLS is enabled. + default: false + show_user: false + - name: tls_ca_file + type: text + required: false + title: TLS CA File + description: Path to the CA certificate file for server certificate verification. Only used when TLS is enabled. + show_user: false + - name: tls_cert_file + type: text + required: false + title: TLS Certificate File + description: Path to the TLS certificate file for client authentication. + show_user: false + - name: tls_key_file + type: text + required: false + title: TLS Key File + description: Path to the TLS key file for client authentication. + show_user: false + - name: tls_server_name_override + type: text + required: false + title: TLS Server Name Override + description: Override the virtual host name of authority in TLS requests. + show_user: false + - name: tls_min_version + type: select + required: false + title: TLS Min Version + description: Minimum acceptable TLS version. + show_user: false + options: + - text: "1.0" + value: "1.0" + - text: "1.1" + value: "1.1" + - text: "1.2" + value: "1.2" + - text: "1.3" + value: "1.3" + - name: tls_max_version + type: select + required: false + title: TLS Max Version + description: Maximum acceptable TLS version. + show_user: false + options: + - text: "1.0" + value: "1.0" + - text: "1.1" + value: "1.1" + - text: "1.2" + value: "1.2" + - text: "1.3" + value: "1.3" + - name: tls_include_system_ca_certs_pool + type: bool + required: false + title: Include System CA Certs Pool + description: Whether to load the system certificate authorities pool alongside the certificate authority. + default: false + show_user: false owner: github: elastic/ecosystem type: elastic From c4e49dd32257385d6c98c1dbbb9731eebf769c88 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 20 Feb 2026 16:22:59 +0100 Subject: [PATCH 16/28] Remove port from docker-compose scenario --- .../_dev/deploy/docker/docker-compose.yml | 12 +++++++----- .../scripts/{send_traces.sh => run_queries.sh} | 0 2 files changed, 7 insertions(+), 5 deletions(-) rename packages/zipkin_input_otel/_dev/deploy/docker/scripts/{send_traces.sh => run_queries.sh} (100%) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml index b9b744a3d45..0cd0903caec 100644 --- a/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml +++ b/packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml @@ -1,19 +1,21 @@ version: '2.3' services: - generate_traces: + run_queries: image: curlimages/curl environment: - TARGET_URL=http://backend:9000 volumes: - - ./scripts/send_traces.sh:/send_traces.sh - command: ["sh", "/send_traces.sh"] + - ./scripts/run_queries.sh:/run_queries.sh + command: ["sh", "/run_queries.sh"] depends_on: backend: condition: service_healthy + # Scenario based on the example defined in + # https://github.com/openzipkin/brave-example/tree/a71b18511b4fc8cbbe67ea2a6fd5ca43048c2465/docker + # https://github.com/openzipkin/brave-example/blob/a71b18511b4fc8cbbe67ea2a6fd5ca43048c2465/README.md#running-the-example + # The backend container is used to generate traces that are sent to the elastic-agent container. backend: image: ghcr.io/openzipkin/brave-example:armeria entrypoint: start-backend - ports: - - 9000:9000 environment: - ZIPKIN_BASEURL=http://elastic-agent:9411 diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh similarity index 100% rename from packages/zipkin_input_otel/_dev/deploy/docker/scripts/send_traces.sh rename to packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh From 6f79334cbced4859cd615553058ea6cdc3178814 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Mon, 23 Feb 2026 12:29:03 +0100 Subject: [PATCH 17/28] Update zipking and otel logo Zipkin logo based on this https://github.com/openzipkin/openzipkin.github.io/blob/master/public/img/logo_svg/zipkin_symbol.svg --- .../img/zipkin_otel_logo.svg | 35 ------------ .../img/zipkin_symbol_logo_otel.svg | 55 +++++++++++++++++++ packages/zipkin_input_otel/manifest.yml | 2 +- 3 files changed, 56 insertions(+), 36 deletions(-) delete mode 100644 packages/zipkin_input_otel/img/zipkin_otel_logo.svg create mode 100644 packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg diff --git a/packages/zipkin_input_otel/img/zipkin_otel_logo.svg b/packages/zipkin_input_otel/img/zipkin_otel_logo.svg deleted file mode 100644 index 42cf49765b2..00000000000 --- a/packages/zipkin_input_otel/img/zipkin_otel_logo.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - diff --git a/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg b/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg new file mode 100644 index 00000000000..7ce408234a5 --- /dev/null +++ b/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg @@ -0,0 +1,55 @@ + + + + 자산 1 + + + + + + + + + 자산 1 + + + + + + + + diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 07e56a875a6..0b00e91b01c 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -15,7 +15,7 @@ conditions: elastic: subscription: "basic" icons: - - src: /img/zipkin_otel_logo.svg + - src: /img/zipkin_symbol_logo_otel.svg title: Zipkin OTel logo size: 32x32 type: image/svg+xml From 3259fc860efaf45e3cbad9a7583ae668d0f6263e Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Mon, 23 Feb 2026 17:32:43 +0100 Subject: [PATCH 18/28] Update logo to avoid using embedded images --- .../img/zipkin_symbol_logo_otel.svg | 96 ++++++++++--------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg b/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg index 7ce408234a5..06e4a16fde1 100644 --- a/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg +++ b/packages/zipkin_input_otel/img/zipkin_symbol_logo_otel.svg @@ -1,55 +1,63 @@ + + + xmlns:svg="http://www.w3.org/2000/svg"> - 자산 1 + id="defs2" /> + id="layer1"> - + id="g361" + transform="matrix(0.05792443,0,0,0.05477942,-3.5590378,-7.8742537)"> + + + + + + + + + + + - - - - - 자산 1 - - - - - - From 8302da9b3e0e451de5ae515db7273d9087ef7c88 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Mon, 23 Feb 2026 18:06:43 +0100 Subject: [PATCH 19/28] Update default value for tls_insecure field Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- packages/zipkin_input_otel/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 0b00e91b01c..b2b93c16e70 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -54,7 +54,7 @@ policy_templates: required: false title: Disable TLS description: Whether to disable client transport security for the connection. Set to false to enable TLS. - default: true + default: false show_user: false - name: tls_insecure_skip_verify type: bool From 495eeae7d77e656061de252808915d9e8a459e53 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Tue, 24 Feb 2026 10:24:23 +0100 Subject: [PATCH 20/28] Remove Dockerfile and Go source files for unused test tool --- .../_dev/deploy/docker/source/Dockerfile | 10 -- .../_dev/deploy/docker/source/go.mod | 3 - .../_dev/deploy/docker/source/main.go | 152 ------------------ 3 files changed, 165 deletions(-) delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod delete mode 100644 packages/zipkin_input_otel/_dev/deploy/docker/source/main.go diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile b/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile deleted file mode 100644 index dabcb405a06..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Build stage -FROM golang:1.21-alpine AS builder -WORKDIR /app -COPY go.mod main.go . -RUN go build -o send-zipkin-traces . - -# Runtime stage -FROM alpine:3.18 -COPY --from=builder /app/send-zipkin-traces /send-zipkin-traces -ENTRYPOINT ["/send-zipkin-traces"] diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod b/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod deleted file mode 100644 index f94e96e782d..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module zipkin-trace-sender - -go 1.21 diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go b/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go deleted file mode 100644 index c8e4d8b299b..00000000000 --- a/packages/zipkin_input_otel/_dev/deploy/docker/source/main.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. - -// zipkin-trace-sender sends sample trace JSON files to a Zipkin endpoint on SIGHUP. -// It treats HTTP 200 and 202 as success (unlike the stream container which fails on 202). -package main - -import ( - "bytes" - "context" - "crypto/tls" - "fmt" - "log" - "net/http" - "net/url" - "os" - "os/signal" - "path/filepath" - "strings" - "syscall" - "time" -) - -const ( - defaultEndpoint = "http://elastic-agent:9411" - defaultTracesDir = "/sample_traces" - defaultTracesGlob = "sample*.json" - spansPath = "/api/v2/spans" - - defaultTimeout = 5 * time.Second -) - -func main() { - ctx := context.Background() - endpoint := getEnv("ZIPKIN_ENDPOINT", defaultEndpoint) - endpoint = normalizeEndpoint(endpoint) - spansURL := endpoint + spansPath - - tracesPattern := getEnv("TRACES_PATTERN", "") - if tracesPattern == "" { - tracesDir := getEnv("TRACES_DIR", defaultTracesDir) - tracesPattern = filepath.Join(tracesDir, defaultTracesGlob) - } - - sendDelay := time.Duration(0) - if d := getEnv("SEND_DELAY", ""); d != "" { - var err error - sendDelay, err = time.ParseDuration(d) - if err != nil { - log.Printf("invalid SEND_DELAY %q: %v; using 0", d, err) - } - } - - ctx, stop := signal.NotifyContext(ctx, syscall.SIGHUP) - defer stop() - - log.Printf("zipkin-trace-sender: endpoint=%s traces_pattern=%s send_delay=%s; waiting for SIGHUP", spansURL, tracesPattern, sendDelay) - - <-ctx.Done() - - if sendDelay > 0 { - log.Printf("waiting for %s before tearing down...", sendDelay) - select { - case <-time.After(sendDelay): - case <-ctx.Done(): - } - } - - if err := sendTraces(spansURL, tracesPattern); err != nil { - log.Printf("send failed: %v", err) - os.Exit(1) - } - log.Printf("send completed successfully") -} - -func normalizeEndpoint(s string) string { - s = strings.TrimSpace(s) - if s == "" { - return defaultEndpoint - } - if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") { - s = "http://" + s - } - u, err := url.Parse(s) - if err != nil { - return s - } - u.Path = "" - u.RawPath = "" - u.RawQuery = "" - return strings.TrimSuffix(u.String(), "/") -} - -func getEnv(key, defaultValue string) string { - if v := os.Getenv(key); v != "" { - return v - } - return defaultValue -} - -func sendTraces(spansURL, pattern string) error { - matches, err := filepath.Glob(pattern) - if err != nil { - return fmt.Errorf("glob %s: %w", pattern, err) - } - if len(matches) == 0 { - log.Printf("no files matched %s", pattern) - return nil - } - - client := &http.Client{ - Timeout: defaultTimeout, - Transport: &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: false, - }, - }, - } - - for _, path := range matches { - if err := sendTraceFile(client, spansURL, path); err != nil { - return err - } - } - - return nil -} - -// sendTraceFile reads one trace file and POSTs it to the Zipkin spans endpoint. -// It is a separate function so that defer resp.Body.Close() runs at the end of -// each call, not at the end of the loop. -func sendTraceFile(client *http.Client, spansURL, path string) error { - data, err := os.ReadFile(path) - if err != nil { - return fmt.Errorf("read %s: %w", path, err) - } - - resp, err := client.Post(spansURL, "application/json", bytes.NewReader(data)) - if err != nil { - return fmt.Errorf("POST %s: %w", path, err) - } - defer resp.Body.Close() - - // Zipkin returns 202 for accepted traces - // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/a13d183f72cd20c2c705ec63cb5180ddb3d9b751/receiver/zipkinreceiver/trace_receiver.go#L240-L246 - if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted { - return fmt.Errorf("POST %s: status %d", path, resp.StatusCode) - } - log.Printf("posted %s -> %d", path, resp.StatusCode) - return nil -} From fe518ffe9c5d46584d892896cd01c6b58907e5a9 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 26 Feb 2026 10:18:44 +0100 Subject: [PATCH 21/28] Update docs --- packages/zipkin_input_otel/_dev/build/docs/README.md | 7 ++----- packages/zipkin_input_otel/docs/README.md | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/build/docs/README.md b/packages/zipkin_input_otel/_dev/build/docs/README.md index 1109c316a65..80968afe732 100644 --- a/packages/zipkin_input_otel/_dev/build/docs/README.md +++ b/packages/zipkin_input_otel/_dev/build/docs/README.md @@ -8,17 +8,14 @@ This package receives Zipkin trace data (V1 and V2 JSON/Protobuf formats) by con ## Configuration -| Setting | Description | Default | -|---|---|---| -| Endpoint | The `host:port` address to listen on for Zipkin spans | `localhost:9411` | -| Parse String Tags | Parse string tags/binary annotations into int/bool/float types | `false` | +For the full list of settings exposed for the receiver and examples, refer to the [Zipkin Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver). ## Troubleshooting If you encounter issues: 1. Verify the endpoint is accessible and not blocked by a firewall. -2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411/api/v2/spans`). +2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411`). 3. Check the Elastic Agent logs for any receiver errors. ## Traces reference diff --git a/packages/zipkin_input_otel/docs/README.md b/packages/zipkin_input_otel/docs/README.md index 1109c316a65..80968afe732 100644 --- a/packages/zipkin_input_otel/docs/README.md +++ b/packages/zipkin_input_otel/docs/README.md @@ -8,17 +8,14 @@ This package receives Zipkin trace data (V1 and V2 JSON/Protobuf formats) by con ## Configuration -| Setting | Description | Default | -|---|---|---| -| Endpoint | The `host:port` address to listen on for Zipkin spans | `localhost:9411` | -| Parse String Tags | Parse string tags/binary annotations into int/bool/float types | `false` | +For the full list of settings exposed for the receiver and examples, refer to the [Zipkin Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver). ## Troubleshooting If you encounter issues: 1. Verify the endpoint is accessible and not blocked by a firewall. -2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411/api/v2/spans`). +2. Ensure applications are sending Zipkin-formatted traces to the configured endpoint (default: `http://:9411`). 3. Check the Elastic Agent logs for any receiver errors. ## Traces reference From 5ae2e17fb847aa49e93ea15d264f33a787a1af79 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Tue, 3 Mar 2026 19:39:38 +0100 Subject: [PATCH 22/28] Update comments and notes in scripts --- .../_dev/deploy/docker/scripts/run_queries.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh index 419f37968db..fcb215153ce 100755 --- a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh +++ b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh @@ -3,13 +3,16 @@ set -ex TARGET_URL=${TARGET_URL:-http://backend:9000} +SLEEP_TIME=${SLEEP_TIME:-5} -# NOTE: it cannot be done using SIGHUP signal, since the backend container is also -# killed and the traces would not be sent to the elastic-agent container. +# NOTE: backend container is the one that requires to communicate with the elastic-agent container +# to send the traces to the zipkin receiver port. If set the SIGHUP signal in the test system configuration +# file, that signal would be received by the backend container and it gets killed. +# Therefore, the SIGHUP signal is not used to start the workload and it is done here instead (separate container). # Wait for the elastic-agent container to be ready with the corresponding # agent policy assigned -sleep 20 +sleep ${SLEEP_TIME} echo "Sending traces to ${TARGET_URL}/api" i=0 From 5a28fff642a1dcde3f61237672ddd83b7662d08e Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 4 Mar 2026 14:26:50 +0100 Subject: [PATCH 23/28] Update curl command - disabled temporarily --- .../zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh index fcb215153ce..01fdad0b96c 100755 --- a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh +++ b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh @@ -21,7 +21,7 @@ while true; do # Force creating traces containing requests with errors # The following curl command will fail with a 404 error per the backend code. # FIXME: Currently, the traces generated by the backend with errors cause that system tests fail. - # curl "${TARGET_URL}"; sleep 1; + # curl -s -o /dev/null "${TARGET_URL}"; sleep 1; ## Create traces without any errors # curl ${TARGET_URL}/api will return a 200 status code From 89fec12b68c10aa170605ca71ae290f8f68fc395 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Tue, 24 Mar 2026 19:41:02 +0100 Subject: [PATCH 24/28] Update policy tests --- .../test-default-custom-dataset.expected | 83 +++++++++++++++++++ .../policy/test-default-custom-dataset.yml | 4 + .../test-default-disable-use-apm.expected | 57 +++++++++++++ .../policy/test-default-disable-use-apm.yml | 4 + .../test/policy/test-default-use-apm.expected | 83 +++++++++++++++++++ .../_dev/test/policy/test-default-use-apm.yml | 4 + .../test/policy/test-default-vars.expected | 28 ++++++- .../_dev/test/policy/test-default.expected | 28 ++++++- .../_dev/test/policy/test-tls.expected | 28 ++++++- 9 files changed, 316 insertions(+), 3 deletions(-) create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.yml create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.yml create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.expected create mode 100644 packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.yml diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.expected new file mode 100644 index 00000000000..cddb652cb4a --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.expected @@ -0,0 +1,83 @@ +connectors: + elasticapm/componentid-0: {} + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc +processors: + elasticapm/componentid-0: {} + transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.namespace"], "ep") + transform/componentid-1: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkin.custom") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: 0.0.0.0:9411 + parse_string_tags: true +secret_references: [] +service: + pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-1: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - elasticapm/componentid-0 + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - elasticapm/componentid-0 + - forward + processors: + - elasticapm/componentid-0 + - transform/componentid-1 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.yml b/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.yml new file mode 100644 index 00000000000..90f01adbefc --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.yml @@ -0,0 +1,4 @@ +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: true + data_stream.dataset: "zipkin.custom" diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.expected new file mode 100644 index 00000000000..9bfab820c31 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.expected @@ -0,0 +1,57 @@ +connectors: + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc +processors: + transform/componentid-0: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: 0.0.0.0:9411 + parse_string_tags: true +secret_references: [] +service: + pipelines: + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.yml b/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.yml new file mode 100644 index 00000000000..70e101c31d5 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.yml @@ -0,0 +1,4 @@ +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: true + use_apm: false diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.expected new file mode 100644 index 00000000000..005a7c72b66 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.expected @@ -0,0 +1,83 @@ +connectors: + elasticapm/componentid-0: {} + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - traces-*-* + privileges: + - auto_configure + - create_doc + - names: + - logs-generic.otel-* + privileges: + - auto_configure + - create_doc + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc +processors: + elasticapm/componentid-0: {} + transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.namespace"], "ep") + transform/componentid-1: + trace_statements: + - context: span + statements: + - set(attributes["data_stream.type"], "traces") + - set(attributes["data_stream.dataset"], "zipkinreceiver") + - set(attributes["data_stream.namespace"], "ep") + - context: spanevent + statements: + - set(attributes["data_stream.type"], "logs") + - set(attributes["data_stream.namespace"], "ep") +receivers: + zipkin/componentid-0: + endpoint: 0.0.0.0:9411 + parse_string_tags: true +secret_references: [] +service: + pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-1: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - elasticapm/componentid-0 + traces: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + traces/componentid-0: + exporters: + - elasticapm/componentid-0 + - forward + processors: + - elasticapm/componentid-0 + - transform/componentid-1 + receivers: + - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.yml b/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.yml new file mode 100644 index 00000000000..7b383dfd445 --- /dev/null +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-use-apm.yml @@ -0,0 +1,4 @@ +vars: + endpoint: "0.0.0.0:9411" + parse_string_tags: true + use_apm: true diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected index 11e87e9f50c..c23cff1583a 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default-vars.expected @@ -1,4 +1,5 @@ connectors: + elasticapm/componentid-0: {} forward: {} exporters: elasticsearch/componentid-0: @@ -24,8 +25,19 @@ output_permissions: privileges: - auto_configure - create_doc + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc processors: + elasticapm/componentid-0: {} transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.namespace"], "ep") + transform/componentid-1: trace_statements: - context: span statements: @@ -43,6 +55,18 @@ receivers: secret_references: [] service: pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-1: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - elasticapm/componentid-0 traces: exporters: - elasticsearch/componentid-0 @@ -50,8 +74,10 @@ service: - forward traces/componentid-0: exporters: + - elasticapm/componentid-0 - forward processors: - - transform/componentid-0 + - elasticapm/componentid-0 + - transform/componentid-1 receivers: - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-default.expected b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected index 9bfab820c31..005a7c72b66 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-default.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-default.expected @@ -1,4 +1,5 @@ connectors: + elasticapm/componentid-0: {} forward: {} exporters: elasticsearch/componentid-0: @@ -24,8 +25,19 @@ output_permissions: privileges: - auto_configure - create_doc + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc processors: + elasticapm/componentid-0: {} transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.namespace"], "ep") + transform/componentid-1: trace_statements: - context: span statements: @@ -43,6 +55,18 @@ receivers: secret_references: [] service: pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-1: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - elasticapm/componentid-0 traces: exporters: - elasticsearch/componentid-0 @@ -50,8 +74,10 @@ service: - forward traces/componentid-0: exporters: + - elasticapm/componentid-0 - forward processors: - - transform/componentid-0 + - elasticapm/componentid-0 + - transform/componentid-1 receivers: - zipkin/componentid-0 diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected index 98fc9055b5b..3935049d18b 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected @@ -1,4 +1,5 @@ connectors: + elasticapm/componentid-0: {} forward: {} exporters: elasticsearch/componentid-0: @@ -24,8 +25,19 @@ output_permissions: privileges: - auto_configure - create_doc + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc processors: + elasticapm/componentid-0: {} transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.namespace"], "ep") + transform/componentid-1: trace_statements: - context: span statements: @@ -52,6 +64,18 @@ receivers: secret_references: [] service: pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-1: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - elasticapm/componentid-0 traces: exporters: - elasticsearch/componentid-0 @@ -59,8 +83,10 @@ service: - forward traces/componentid-0: exporters: + - elasticapm/componentid-0 - forward processors: - - transform/componentid-0 + - elasticapm/componentid-0 + - transform/componentid-1 receivers: - zipkin/componentid-0 From 8a091e137e3a91acad165957fcd4070bd2999a21 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 25 Mar 2026 12:12:10 +0100 Subject: [PATCH 25/28] Remove tls settings related to client config --- .../_dev/test/policy/test-tls.expected | 2 -- .../_dev/test/policy/test-tls.yml | 3 --- .../agent/input/input.yml.hbs | 7 ------ packages/zipkin_input_otel/manifest.yml | 22 +------------------ 4 files changed, 1 insertion(+), 33 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected index 3935049d18b..8f89b7b1d69 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected +++ b/packages/zipkin_input_otel/_dev/test/policy/test-tls.expected @@ -56,11 +56,9 @@ receivers: ca_file: /path/to/ca.crt cert_file: /path/to/client.crt include_system_ca_certs_pool: true - insecure: false key_file: /path/to/client.key max_version: "1.3" min_version: "1.2" - server_name_override: zipkin.example.com secret_references: [] service: pipelines: diff --git a/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml b/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml index 777857fabd4..6cab88dfc04 100644 --- a/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml +++ b/packages/zipkin_input_otel/_dev/test/policy/test-tls.yml @@ -2,12 +2,9 @@ vars: endpoint: "0.0.0.0:9411" parse_string_tags: true tls_enabled: true - tls_insecure: false - tls_insecure_skip_verify: false tls_ca_file: "/path/to/ca.crt" tls_cert_file: "/path/to/client.crt" tls_key_file: "/path/to/client.key" - tls_server_name_override: "zipkin.example.com" tls_min_version: "1.2" tls_max_version: "1.3" tls_include_system_ca_certs_pool: true diff --git a/packages/zipkin_input_otel/agent/input/input.yml.hbs b/packages/zipkin_input_otel/agent/input/input.yml.hbs index 721ef84c9ee..4d6f323f4dd 100644 --- a/packages/zipkin_input_otel/agent/input/input.yml.hbs +++ b/packages/zipkin_input_otel/agent/input/input.yml.hbs @@ -4,10 +4,6 @@ receivers: parse_string_tags: {{parse_string_tags}} {{#if tls_enabled}} tls: - insecure: {{tls_insecure}} -{{#if tls_insecure_skip_verify}} - insecure_skip_verify: {{tls_insecure_skip_verify}} -{{/if}} {{#if tls_ca_file}} ca_file: {{tls_ca_file}} {{/if}} @@ -17,9 +13,6 @@ receivers: {{#if tls_key_file}} key_file: {{tls_key_file}} {{/if}} -{{#if tls_server_name_override}} - server_name_override: {{tls_server_name_override}} -{{/if}} {{#if tls_min_version}} min_version: "{{tls_min_version}}" {{/if}} diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index b2b93c16e70..73664d048b7 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -46,23 +46,9 @@ policy_templates: type: bool required: false title: Enable TLS Configuration - description: Enable TLS configuration for connecting to the server. + description: Enable TLS for the Zipkin receiver listener. default: false show_user: true - - name: tls_insecure - type: bool - required: false - title: Disable TLS - description: Whether to disable client transport security for the connection. Set to false to enable TLS. - default: false - show_user: false - - name: tls_insecure_skip_verify - type: bool - required: false - title: Skip TLS Verification - description: Whether to skip verifying the server certificate when TLS is enabled. - default: false - show_user: false - name: tls_ca_file type: text required: false @@ -81,12 +67,6 @@ policy_templates: title: TLS Key File description: Path to the TLS key file for client authentication. show_user: false - - name: tls_server_name_override - type: text - required: false - title: TLS Server Name Override - description: Override the virtual host name of authority in TLS requests. - show_user: false - name: tls_min_version type: select required: false From c50805e8e2217c879d8ccd0833daad6a35ffa6de Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 25 Mar 2026 12:12:29 +0100 Subject: [PATCH 26/28] Set a default value for tls.min_version Setting a default value for min_version also ensures that the configuration for `tls` is always valid in the agent template. --- packages/zipkin_input_otel/agent/input/input.yml.hbs | 2 -- packages/zipkin_input_otel/manifest.yml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/zipkin_input_otel/agent/input/input.yml.hbs b/packages/zipkin_input_otel/agent/input/input.yml.hbs index 4d6f323f4dd..3ee9a8b555c 100644 --- a/packages/zipkin_input_otel/agent/input/input.yml.hbs +++ b/packages/zipkin_input_otel/agent/input/input.yml.hbs @@ -13,9 +13,7 @@ receivers: {{#if tls_key_file}} key_file: {{tls_key_file}} {{/if}} -{{#if tls_min_version}} min_version: "{{tls_min_version}}" -{{/if}} {{#if tls_max_version}} max_version: "{{tls_max_version}}" {{/if}} diff --git a/packages/zipkin_input_otel/manifest.yml b/packages/zipkin_input_otel/manifest.yml index 73664d048b7..3005fb79140 100644 --- a/packages/zipkin_input_otel/manifest.yml +++ b/packages/zipkin_input_otel/manifest.yml @@ -71,7 +71,7 @@ policy_templates: type: select required: false title: TLS Min Version - description: Minimum acceptable TLS version. + description: Minimum acceptable TLS version. Default is 1.2. show_user: false options: - text: "1.0" @@ -82,6 +82,7 @@ policy_templates: value: "1.2" - text: "1.3" value: "1.3" + default: "1.2" - name: tls_max_version type: select required: false From ee3ff3c209ff858d50e6f0adc8b436ceca58b913 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Wed, 25 Mar 2026 12:50:33 +0100 Subject: [PATCH 27/28] [system tests] Add queries that cause error 404 --- .../_dev/deploy/docker/scripts/run_queries.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh index 01fdad0b96c..bd244f45425 100755 --- a/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh +++ b/packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh @@ -20,11 +20,11 @@ while true; do echo "Trigger query ${i}" # Force creating traces containing requests with errors # The following curl command will fail with a 404 error per the backend code. - # FIXME: Currently, the traces generated by the backend with errors cause that system tests fail. - # curl -s -o /dev/null "${TARGET_URL}"; sleep 1; + curl -s -o /dev/null "${TARGET_URL}" ## Create traces without any errors # curl ${TARGET_URL}/api will return a 200 status code - curl -s -o /dev/null "${TARGET_URL}/api"; sleep 1; + curl -s -o /dev/null "${TARGET_URL}/api" i=$((i+1)) + sleep 1 done From f8c2416b53f83c23a964ed1bdc3f359a264f930f Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Thu, 26 Mar 2026 13:26:53 +0100 Subject: [PATCH 28/28] Add sample_event.json --- packages/zipkin_input_otel/sample_event.json | 120 +++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 packages/zipkin_input_otel/sample_event.json diff --git a/packages/zipkin_input_otel/sample_event.json b/packages/zipkin_input_otel/sample_event.json new file mode 100644 index 00000000000..259e8c06d2a --- /dev/null +++ b/packages/zipkin_input_otel/sample_event.json @@ -0,0 +1,120 @@ +{ + "@timestamp": "2026-03-26T12:25:35.754Z", + "agent": { + "name": "otlp", + "version": "unknown" + }, + "attributes": { + "error": "404", + "event": { + "outcome": "failure", + "success_count": 0 + }, + "http": { + "method": "GET", + "path": "/", + "status_code": "404" + }, + "net": { + "host": { + "ip": "172.20.0.2" + }, + "peer": { + "ip": "172.20.0.3", + "port": 57164 + } + }, + "processor": { + "event": "transaction" + }, + "timestamp": { + "us": 1774527935754203 + }, + "transaction": { + "duration": { + "us": 1232 + }, + "id": "9ad9a59b1209fab2", + "name": "GET /*", + "representative_count": 1, + "result": "Error", + "root": true, + "sampled": true, + "type": "request" + } + }, + "data_stream": { + "dataset": "zipkinreceiver.otel", + "namespace": "18683", + "type": "traces" + }, + "duration": 1232000, + "error": "404", + "event": { + "agent_id_status": "missing", + "dataset": "zipkinreceiver.otel", + "ingested": "2026-03-26T12:25:46Z", + "outcome": "failure", + "success_count": 0 + }, + "http": { + "method": "GET", + "path": "/", + "status_code": "404" + }, + "kind": "Server", + "name": "GET /*", + "net": { + "host": { + "ip": "172.20.0.2" + }, + "peer": { + "ip": "172.20.0.3", + "port": 57164 + } + }, + "processor": { + "event": "transaction" + }, + "resource": { + "attributes": { + "agent": { + "name": "otlp", + "version": "unknown" + }, + "service": { + "name": "backend" + } + } + }, + "service": { + "name": "backend" + }, + "span": { + "id": "9ad9a59b1209fab2", + "name": "GET /*" + }, + "span_id": "9ad9a59b1209fab2", + "status": { + "code": "Error" + }, + "timestamp": { + "us": 1774527935754203 + }, + "trace": { + "id": "00000000000000009ad9a59b1209fab2" + }, + "trace_id": "00000000000000009ad9a59b1209fab2", + "transaction": { + "duration": { + "us": 1232 + }, + "id": "9ad9a59b1209fab2", + "name": "GET /*", + "representative_count": 1, + "result": "Error", + "root": true, + "sampled": true, + "type": "request" + } +}