Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
df35366
[New Integration] StatsD OpenTelemetry Input Package
github-actions[bot] Jan 29, 2026
3275f09
Merge branch 'main' into claude/issue-17108-20260129-0608
jlind23 Jan 29, 2026
196d1a4
update code owners
jlind23 Jan 29, 2026
2531099
ensure consistency between package name and folder name
jlind23 Jan 29, 2026
58e41e5
Update packages/statsd_input_otel/_dev/deploy/docker/docker-compose.yml
jlind23 Jan 29, 2026
6dbbb48
Update packages/statsd_input_otel/_dev/test/system/test-default-confi…
jlind23 Jan 29, 2026
c0f1f6a
clean up
jlind23 Jan 29, 2026
43901fe
remove uselss condition
jlind23 Jan 29, 2026
f94132a
ensure naming consistency
jlind23 Jan 29, 2026
d70d8e4
Update packages/statsd_input_otel/manifest.yml
jlind23 Jan 29, 2026
fe49a2f
clean up manifest
jlind23 Jan 29, 2026
9ab0e88
clean up manifest
jlind23 Jan 29, 2026
9464b1c
add test config
jlind23 Jan 29, 2026
eb83a42
fix tests
jlind23 Feb 10, 2026
3fa713d
Merge branch 'main' into claude/issue-17108-20260129-0608
jlind23 Feb 10, 2026
23f8bbc
update constraint since the receiver was only added later
jlind23 Feb 10, 2026
ae057c1
Merge remote-tracking branch 'origin/main' into claude/issue-17108-20…
github-actions[bot] Feb 10, 2026
a8cc2dc
Update package ownership to ecosystem and add OTel badge to logo
github-actions[bot] Feb 10, 2026
617d85f
Apply suggestion from @mrodm
jlind23 Feb 10, 2026
b681df0
Apply suggestions from code review
jlind23 Feb 10, 2026
fd5107f
Address review comments from @mrodm
github-actions[bot] Feb 10, 2026
10ae0e4
regerenate sample event json file
jlind23 Feb 10, 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 @@ -426,6 +426,7 @@
/packages/squid @elastic/integration-experience
/packages/stan @elastic/obs-infraobs-integrations
/packages/statsd_input @elastic/obs-infraobs-integrations
/packages/statsd_input_otel @elastic/obs-infraobs-integrations
/packages/stormshield @elastic/integration-experience
/packages/sublime_security @elastic/security-service-integrations
/packages/suricata @elastic/integration-experience
Expand Down
93 changes: 93 additions & 0 deletions packages/statsd_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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '2.3'
services:
statsd_input_otel:
image: docker.elastic.co/observability/stream:v0.18.0
volumes:
- ./sample_logs:/sample_logs:ro
command: log --start-signal=SIGHUP --delay=10s --addr elastic-agent:8125 -p=udp /sample_logs/test-statsd.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
python.counter:1|c
python.gauge.foo:10|g
python.timer.total:0.07200241|ms
python.counter:1|c
python.gauge.foo:10|g
python.timer.total:0.29730797|ms
python.counter:1|c
python.gauge.foo:10|g
python.timer.total:0.30040741|ms
python.counter:1|c
python.gauge.foo:10|g
python.timer.total:0.29134750|ms
3 changes: 3 additions & 0 deletions packages/statsd_input_otel/_dev/deploy/variants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variants:
default: {}
default: default
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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:
- metrics-*-*
privileges:
- auto_configure
- create_doc
processors:
resourcedetection/componentid-0:
detectors:
- system
transform/componentid-1:
metric_statements:
- context: datapoint
statements:
- set(attributes["data_stream.type"], "metrics")
- set(attributes["data_stream.dataset"], "statsd_input_otel.statsdreceiver")
- set(attributes["data_stream.namespace"], "ep")
receivers:
statsd/componentid-0:
aggregation_interval: 60s
enable_metric_type: false
endpoint: localhost:8125
is_monotonic_counter: false
transport: udp
secret_references: []
service:
pipelines:
metrics:
exporters:
- elasticsearch/componentid-0
receivers:
- forward
metrics/componentid-0:
exporters:
- forward
processors:
- resourcedetection/componentid-0
- transform/componentid-1
receivers:
- statsd/componentid-0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
vars:
endpoint: "localhost:8125"
transport: udp
aggregation_interval: 60s
enable_metric_type: false
is_monotonic_counter: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there are system tests defined, please generate a sample_event.json file via this command:

elastic-package test system -v --generate

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vars:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 CRITICAL Duplicate 'vars:' key causes invalid YAML

Why: The file has 'vars:' defined twice, which is invalid YAML and will fail to parse during tests.

Suggested change
vars:
vars:
endpoint: "0.0.0.0:8125"

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

endpoint: "0.0.0.0:8125"
19 changes: 19 additions & 0 deletions packages/statsd_input_otel/agent/input/input.yml.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
receivers:
statsd:
endpoint: {{endpoint}}
{{#if transport}}
transport: {{transport}}
{{/if}}
{{#if aggregation_interval}}
aggregation_interval: {{aggregation_interval}}
{{/if}}
enable_metric_type: {{enable_metric_type}}
is_monotonic_counter: {{is_monotonic_counter}}
processors:
resourcedetection/system:
detectors: ["system"]
service:
pipelines:
metrics:
receivers: [statsd]
processors: [resourcedetection/system]
6 changes: 6 additions & 0 deletions packages/statsd_input_otel/changelog.yml
Original file line number Diff line number Diff line change
@@ -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/issues/17108
61 changes: 61 additions & 0 deletions packages/statsd_input_otel/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# StatsD OpenTelemetry Input Package

## Overview
The StatsD OpenTelemetry Input Package for Elastic enables collection of metrics from StatsD-compatible applications through OpenTelemetry protocols using the [statsdreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/statsdreceiver#statsd-receiver).


### How it works
This package receives telemetry data from StatsD-compatible applications by configuring the StatsD endpoint in the Input Package, which then gets applied to the statsdreceiver 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.

The StatsD receiver listens on a UDP (default), TCP, or Unix socket endpoint for incoming StatsD messages and parses them into OTLP equivalent metric representations.


### Supported metric types

**Counter (c)**
: Measurement which accumulates over period of time until flushed.

**Gauge (g)**
: Measurement which can increase, decrease or be set to a value.

**Timer (ms)**
: Time measurement (in milliseconds) of an event.

**Histogram (h)**
: Time measurement, alias for timer.


### Supported tag extensions

The StatsD receiver supports the following tag formats:

**DogStatsD**
`<metric name>:<value>|<type>|@<sample-rate>|#<tag-key>:<tag-value>,<tag-key>:<tag-value>`

**InfluxDB**
`<metric name>,<tag-key>=<tag-value>,<tag-key>=<tag-value>:<value>|<type>|@<sample-rate>`

**Graphite 1.1.x**
`<metric name>;<tag-key>=<tag-value>;<tag-key>=<tag-value>:<value>|<type>|@<sample-rate>`


## Configuration options

**Endpoint**
: Address and port to listen on. Default is `localhost:8125` for UDP and TCP transports.

**Transport Protocol**
: Protocol used by the StatsD server. Supported values are `udp` (default), `tcp`, and `unixgram`.

**Aggregation Interval**
: The aggregation time that the receiver aggregates the metrics, similar to the flush interval in StatsD server. Default is `60s`.

**Enable Metric Type**
: When enabled, emits the StatsD metric type (gauge, counter, timer, histogram) as a label on the metric.

**Monotonic Counter**
: When enabled, sets all counter metrics as monotonic.


## Metrics reference
For a complete list of all available metrics and their detailed descriptions, refer to the [StatsD Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/statsdreceiver) in the upstream OpenTelemetry Collector repository.
15 changes: 15 additions & 0 deletions packages/statsd_input_otel/img/statsd_otellogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions packages/statsd_input_otel/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
format_version: 3.5.0
name: statsd_input_otel
title: "StatsD OpenTelemetry Input Package"
version: 0.1.0
source:
license: "Elastic-2.0"
description: "StatsD OpenTelemetry Input Package"
type: input
categories:
- observability
- opentelemetry
- custom
conditions:
kibana:
version: "^9.2.0"
elastic:
subscription: "basic"
icons:
- src: /img/statsd_otellogo.svg
title: StatsD OTel logo
size: 32x32
type: image/svg+xml
policy_templates:
- name: statsdreceiver
type: metrics
title: StatsD OpenTelemetry Input
description: Collect StatsD metrics using OpenTelemetry Collector
input: otelcol
template_path: input.yml.hbs
vars:
- name: endpoint
type: text
required: true
title: Endpoint
description: Address and port to listen on for StatsD metrics.
default: localhost:8125
- name: transport
type: text
required: false
title: Transport Protocol
description: Protocol used by the StatsD server. Supported values are udp, tcp, and unixgram.
default: udp
show_user: false
- name: aggregation_interval
type: duration
required: false
title: Aggregation Interval
description: The aggregation time that the receiver aggregates the metrics (similar to the flush interval in StatsD server).
default: 60s
show_user: false
- name: enable_metric_type
type: bool
required: false
title: Enable Metric Type
description: Emit the StatsD metric type (gauge, counter, timer, histogram) as a label.
default: false
show_user: false
- name: is_monotonic_counter
type: bool
required: false
title: Monotonic Counter
description: Set all counter metrics as monotonic.
default: false
show_user: false
owner:
github: elastic/obs-infraobs-integrations
type: elastic