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

TCP Statsd Receiver is not able to read payload #33951

Open
4wdonny opened this issue Jul 8, 2024 · 3 comments
Open

TCP Statsd Receiver is not able to read payload #33951

4wdonny opened this issue Jul 8, 2024 · 3 comments
Labels
bug Something isn't working needs triage New item requiring triage receiver/statsd statsd related issues

Comments

@4wdonny
Copy link

4wdonny commented Jul 8, 2024

Component(s)

receiver/statsd

What happened?

Description

TCP Statsd Receiver can't decode payload

Steps to Reproduce

I've deployed the veneur-emit docker image and have it setup to emit metrics to a GCP LB in front of some collector pods using the statsd receiver set to TCP transport mode. If I set veneur-emit to ship the same metric via UDP to an agent running the statsd receiver with UDP set as the transport, I see my metrics processed correctly.

Expected Result

Statsd Metrics are ingested and processed over TCP the same as they are UDP

Actual Result

debug [email protected]/reporter.go:46 TCP transport (10.3.5.124:8128) Error reading payload: EOF {"kind": "receiver", "name": "statsd", "data_type": "metrics"}

Veneur Emit command

/veneur-emit -hostport tcp:https://$GCP_LB:8128 -name "my.test.metric" -tag "env:sandbox" -count "1" -debug

Collector version

0.103.0

Environment information

Environment

GKE 1.28

OpenTelemetry Collector configuration

statsd:
    endpoint: "0.0.0.0:8128"
    transport: "tcp"
    aggregation_interval: 60s
    enable_metric_type: true
    enable_simple_tags: true
    is_monotonic_counter: true
    timer_histogram_mapping:
      - statsd_type: "histogram"
        observer_type: "gauge"
      - statsd_type: "timing"
        observer_type: "histogram"
        histogram:
          max_size: 100

Log output

No response

Additional context

No response

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

github-actions bot commented Jul 8, 2024

Pinging code owners:

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

@bacherfl
Copy link
Contributor

bacherfl commented Jul 9, 2024

Hi, I was looking into this and also encountered this error log. However the metric i have sent seemed to have been received correctly. This was the command i used:

echo "test.metric:42|c|#myKey:myVal" | nc -w 100000 -4 -v localhost 8125;

I have also created a PR to not log an error when an EOF is encountered, as that is expected when the received payload is read completely

@4wdonny
Copy link
Author

4wdonny commented Jul 9, 2024

@bacherfl thanks for the reply. I have recreated your example and can confirm that the metric is logged when fired that way. I'm still not having any luck with the veneur-emit tool, which I had been relying on to programmatically emit statsd metrics for testing, but perhaps this is a bug on that side and not the tcp receiver. Feel free to close this when your PR is merged (or it can be closed before since the two aren't 100% related. Thanks again.

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

2 participants