Skip to content
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

Minimal viable statsdreceiver not working #34067

Closed
paulkiernan opened this issue Jul 13, 2024 · 1 comment
Closed

Minimal viable statsdreceiver not working #34067

paulkiernan opened this issue Jul 13, 2024 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/statsd statsd related issues

Comments

@paulkiernan
Copy link

Component(s)

receiver/statsd

What happened?

Description

I'm testing setting up a pipeline to receive DogStatsD metrics emitted from the third-party service we host. When setting up a toy example of a otel-collector with a statsd pipeline defined I'm afraid I haven't been able to print statsd metrics received via the debug or file exporters.

Steps to Reproduce

Create a config file with the contents:

receivers:
  statsd:
    endpoint: "0.0.0.0:8125"
    aggregation_interval: 10s

exporters:
  debug:
    verbosity: normal
  file:
    path: /tmp/output/test.json

service:
  telemetry:
    logs:
      level: "DEBUG"
  pipelines:
    metrics:
     receivers:
       - statsd
     exporters:
       - debug
       - file

Run with docker:

docker run \
    -it \
    -v ./test2.yaml:/tmp/config.yaml \. # where test2.yaml is the name of the config from above
    -v ./output:/tmp/output \
    -p 8125:8125/udp \
    -p 8888:8888 \
    otel/opentelemetry-collector-contrib:0.104.0 --config=file:/tmp/config.yaml

In another window, publish message via:

echo "test.metric:42|c|#myKey:myVal" | nc -u -6 localhost 8125;

Expected Result

netcat command should exit and a reference to the test.metric should display in the collector logs via the debug exporter, and in the output/test.json.

Actual Result

netcat hangs and nothing shows up in either exporter.

Collector version

0.104.0

Environment information

Environment

OS: Mac osx 14.5 (sonoma)
Docker:

docker version                                                                                                                                                                                                                                                                             130 ↵
Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.0.0
 API version:       1.45
 Go version:        go1.21.8
 Git commit:        2ae903e
 Built:             Wed Mar 20 15:14:46 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.29.0 (145265)
 Engine:
  Version:          26.0.0
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.8
  Git commit:       8b79278
  Built:            Wed Mar 20 15:18:02 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

OpenTelemetry Collector configuration

receivers:
  statsd:
    endpoint: "0.0.0.0:8125"
    aggregation_interval: 10s

exporters:
  debug:
    verbosity: normal
  file:
    path: /tmp/output/test.json

service:
  telemetry:
    logs:
      level: "DEBUG"
  pipelines:
    metrics:
     receivers:
       - statsd
     exporters:
       - debug
       - file

Log output

2024-07-13T02:51:56.395Z        info    service@v0.104.0/service.go:115 Setting up own telemetry...
2024-07-13T02:51:56.395Z        info    service@v0.104.0/telemetry.go:96        Serving metrics {"address": ":8888", "level": "Normal"}
2024-07-13T02:51:56.395Z        info    exporter@v0.104.0/exporter.go:280       Development component. May change in the future.        {"kind": "exporter", "data_type": "metrics", "name": "debug"}
2024-07-13T02:51:56.395Z        debug   exporter@v0.104.0/exporter.go:278       Alpha component. May change in the future.      {"kind": "exporter", "data_type": "metrics", "name": "file"}
2024-07-13T02:51:56.395Z        debug   receiver@v0.104.0/receiver.go:313       Beta component. May change in the future.       {"kind": "receiver", "name": "statsd", "data_type": "metrics"}
2024-07-13T02:51:56.396Z        info    service@v0.104.0/service.go:193 Starting otelcol-contrib...     {"Version": "0.104.0", "NumCPU": 8}
2024-07-13T02:51:56.396Z        info    extensions/extensions.go:34     Starting extensions...
2024-07-13T02:51:56.397Z        info    service@v0.104.0/service.go:219 Everything is ready. Begin running and processing data.

Additional context

No response

@paulkiernan paulkiernan added bug Something isn't working needs triage New item requiring triage labels Jul 13, 2024
@github-actions github-actions bot added the receiver/statsd statsd related issues label Jul 13, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/statsd statsd related issues
Projects
None yet
Development

No branches or pull requests

1 participant