Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7150c50
Add zipkin_input_otel package for Zipkin trace collection
github-actions[bot] Feb 4, 2026
bfeeaab
Update zipkin_otellogo.svg with proper Zipkin + OTel combined logo
github-actions[bot] Feb 4, 2026
964f910
Update changelog link.
mrodm Feb 4, 2026
baab446
Update zipkin_otellogo.svg with official Zipkin logo from openzipkin …
github-actions[bot] Feb 4, 2026
504ffd6
Merge branch 'main' into claude/issue-17155-20260204-1126
theletterf Feb 4, 2026
177a3ee
Update system test to split the sample traces files
mrodm Feb 4, 2026
695fa7f
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm Feb 18, 2026
1fc759e
Update zipkin logo with otel logo
mrodm Feb 18, 2026
e1e72c9
Set a new Golang script to post JSON files to zipkin
mrodm Feb 18, 2026
10dc7df
Set minimum kibana version
mrodm Feb 18, 2026
8a7e95a
Update docker-compose.yml with TODO regarding zipkin_input_otel servi…
mrodm Feb 18, 2026
7acdfa7
Fix comments in dockerfile
mrodm Feb 19, 2026
777175a
Refactor trace sending logic in test script
mrodm Feb 19, 2026
b7cbbed
Allow to set the pattern to read for the samples as environment variable
mrodm Feb 19, 2026
0856ba0
Refactor docker-compose setup and add trace sending script
mrodm Feb 20, 2026
b1d50e9
Update policy tests
mrodm Feb 20, 2026
1548262
Add TLS configuration options to Zipkin input manifest and update rel…
mrodm Feb 20, 2026
c4e49dd
Remove port from docker-compose scenario
mrodm Feb 20, 2026
6f79334
Update zipking and otel logo
mrodm Feb 23, 2026
3259fc8
Update logo to avoid using embedded images
mrodm Feb 23, 2026
8302da9
Update default value for tls_insecure field
mrodm Feb 23, 2026
495eeae
Remove Dockerfile and Go source files for unused test tool
mrodm Feb 24, 2026
fe518ff
Update docs
mrodm Feb 26, 2026
5ae2e17
Update comments and notes in scripts
mrodm Mar 3, 2026
37850b3
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm Mar 3, 2026
5a28fff
Update curl command - disabled temporarily
mrodm Mar 4, 2026
865f29a
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm Mar 24, 2026
89fec12
Update policy tests
mrodm Mar 24, 2026
8a091e1
Remove tls settings related to client config
mrodm Mar 25, 2026
c50805e
Set a default value for tls.min_version
mrodm Mar 25, 2026
ee3ff3c
[system tests] Add queries that cause error 404
mrodm Mar 25, 2026
f8c2416
Add sample_event.json
mrodm Mar 26, 2026
cb92a0c
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm Apr 2, 2026
e2e1cd1
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm May 4, 2026
5e0eb12
Update expected files for policy tests
mrodm May 4, 2026
7ff9608
Merge remote-tracking branch 'upstream/main' into claude/issue-17155-…
mrodm May 4, 2026
183ee6a
Add more sample event files
mrodm May 4, 2026
fb527b7
Add a new system test with a custom dataset
mrodm May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@
/packages/zeek @elastic/integration-experience
/packages/zerofox @elastic/security-service-integrations
/packages/zeronetworks @elastic/security-service-integrations
/packages/zipkin_input_otel @elastic/ecosystem
Comment thread
mrodm marked this conversation as resolved.
/packages/zookeeper @elastic/obs-infraobs-integrations
/packages/zoom @elastic/security-service-integrations
/packages/zscaler_zia @elastic/security-service-integrations
Expand Down
93 changes: 93 additions & 0 deletions packages/zipkin_input_otel/LICENSE.txt
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.
25 changes: 25 additions & 0 deletions packages/zipkin_input_otel/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
@@ -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://<host>: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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '2.3'
services:
zipkin_input_otel:
build:
context: ./source
dockerfile: Dockerfile
volumes:
- ./sample_traces:/sample_traces:ro
environment:
- ZIPKIN_ENDPOINT=http://elastic-agent:9411
- TRACES_DIR=/sample_traces
- SEND_DELAY=5s
Original file line number Diff line number Diff line change
@@ -0,0 +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"}}]
Original file line number Diff line number Diff line change
@@ -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"}}]
Original file line number Diff line number Diff line change
@@ -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"}}]
Original file line number Diff line number Diff line change
@@ -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"}}]
10 changes: 10 additions & 0 deletions packages/zipkin_input_otel/_dev/deploy/docker/source/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions packages/zipkin_input_otel/_dev/deploy/docker/source/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module zipkin-trace-sender

go 1.21
138 changes: 138 additions & 0 deletions packages/zipkin_input_otel/_dev/deploy/docker/source/main.go
Original file line number Diff line number Diff line change
@@ -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()
Comment thread
mrodm marked this conversation as resolved.
Outdated

// 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
}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vars: ~
Loading