-
Notifications
You must be signed in to change notification settings - Fork 556
Add zipkin_input_otel package for Zipkin trace collection #17226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mrodm
wants to merge
32
commits into
main
Choose a base branch
from
claude/issue-17155-20260204-1126
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7150c50
Add zipkin_input_otel package for Zipkin trace collection
github-actions[bot] bfeeaab
Update zipkin_otellogo.svg with proper Zipkin + OTel combined logo
github-actions[bot] 964f910
Update changelog link.
mrodm baab446
Update zipkin_otellogo.svg with official Zipkin logo from openzipkin …
github-actions[bot] 504ffd6
Merge branch 'main' into claude/issue-17155-20260204-1126
theletterf 177a3ee
Update system test to split the sample traces files
mrodm 695fa7f
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm 1fc759e
Update zipkin logo with otel logo
mrodm e1e72c9
Set a new Golang script to post JSON files to zipkin
mrodm 10dc7df
Set minimum kibana version
mrodm 8a7e95a
Update docker-compose.yml with TODO regarding zipkin_input_otel servi…
mrodm 7acdfa7
Fix comments in dockerfile
mrodm 777175a
Refactor trace sending logic in test script
mrodm b7cbbed
Allow to set the pattern to read for the samples as environment variable
mrodm 0856ba0
Refactor docker-compose setup and add trace sending script
mrodm b1d50e9
Update policy tests
mrodm 1548262
Add TLS configuration options to Zipkin input manifest and update rel…
mrodm c4e49dd
Remove port from docker-compose scenario
mrodm 6f79334
Update zipking and otel logo
mrodm 3259fc8
Update logo to avoid using embedded images
mrodm 8302da9
Update default value for tls_insecure field
mrodm 495eeae
Remove Dockerfile and Go source files for unused test tool
mrodm fe518ff
Update docs
mrodm 5ae2e17
Update comments and notes in scripts
mrodm 37850b3
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm 5a28fff
Update curl command - disabled temporarily
mrodm 865f29a
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm 89fec12
Update policy tests
mrodm 8a091e1
Remove tls settings related to client config
mrodm c50805e
Set a default value for tls.min_version
mrodm ee3ff3c
[system tests] Add queries that cause error 404
mrodm f8c2416
Add sample_event.json
mrodm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # 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 | ||
|
|
||
| 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://<host>:9411`). | ||
| 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. |
21 changes: 21 additions & 0 deletions
21
packages/zipkin_input_otel/_dev/deploy/docker/docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: '2.3' | ||
| services: | ||
| run_queries: | ||
| image: curlimages/curl | ||
| environment: | ||
| - TARGET_URL=http://backend:9000 | ||
| volumes: | ||
| - ./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 | ||
| environment: | ||
| - ZIPKIN_BASEURL=http://elastic-agent:9411 |
30 changes: 30 additions & 0 deletions
30
packages/zipkin_input_otel/_dev/deploy/docker/scripts/run_queries.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| set -ex | ||
|
|
||
| TARGET_URL=${TARGET_URL:-http://backend:9000} | ||
| SLEEP_TIME=${SLEEP_TIME:-5} | ||
|
|
||
| # 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 ${SLEEP_TIME} | ||
|
|
||
| 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. | ||
| 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" | ||
| i=$((i+1)) | ||
| sleep 1 | ||
| done |
83 changes: 83 additions & 0 deletions
83
packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
4 changes: 4 additions & 0 deletions
4
packages/zipkin_input_otel/_dev/test/policy/test-default-custom-dataset.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| vars: | ||
| endpoint: "0.0.0.0:9411" | ||
| parse_string_tags: true | ||
| data_stream.dataset: "zipkin.custom" |
57 changes: 57 additions & 0 deletions
57
packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
4 changes: 4 additions & 0 deletions
4
packages/zipkin_input_otel/_dev/test/policy/test-default-disable-use-apm.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| vars: | ||
| endpoint: "0.0.0.0:9411" | ||
| parse_string_tags: true | ||
| use_apm: false |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.