You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the actual csv data is bigger than this, otel collector will return the following error and produce no metrics:
2024-04-23T19:34:33.325Z error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"kind": "receiver", "name": "haproxy", "data_type": "metrics", "error": "error reading stats: record on line 21: wrong number of fields", "scraper": "haproxy"}
Steps to Reproduce
Setup an haproxy that listens on a unix socket for stats, and has enough frontends/backends/listeners to make its "stat" bigger than 4096 bytes. Configure otel collector to collect those stats via the unix socket (see below for config).
Expected Result
Successfully capture stats
Actual Result
Generates the following error:
2024-04-23T19:34:33.325Z error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"kind": "receiver", "name": "haproxy", "data_type": "metrics", "error": "error reading stats: record on line 21: wrong number of fields", "scraper": "haproxy"}
Component(s)
receiver/haproxy
What happened?
Description
When receiving stats via unix socket, the haproxy receiver only captures up to 4096 bytes: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.99.0/receiver/haproxyreceiver/scraper.go#L73
If the actual csv data is bigger than this, otel collector will return the following error and produce no metrics:
Steps to Reproduce
Setup an haproxy that listens on a unix socket for stats, and has enough frontends/backends/listeners to make its "stat" bigger than 4096 bytes. Configure otel collector to collect those stats via the unix socket (see below for config).
Expected Result
Successfully capture stats
Actual Result
Generates the following error:
Collector version
0.99.0
Environment information
Environment
OS: Ubuntu 20.04.6 LTS
OpenTelemetry Collector configuration
Log output
Additional context
One of our haproxies has 43,279 bytes (178 lines) of "stats" data:
And the 4096th byte is in the middle of line 21:
The text was updated successfully, but these errors were encountered: