opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[receiver/statsd] Add self-telemetry

Open sirianni opened this issue 1 year ago • 6 comments
trafficstars

Description: Add telemetry to statsdreceiver

  • otelcol_receiver_accepted_metric_points
  • otelcol_receiver_refused_metric_points
  • otelcol_receiver_statsd_flushed_metric_points
  • otelcol_receiver_statsd_flushes

Implementation note

I debated trying to use the existing receiverhelper.ObsReport for this but rejected that approach for a few reasons

  1. It's less code to just create the instruments directly and use them here.
  2. I don't think we really want Spans getting created for every single statsd line that's sent through the system.
  3. This wouldn't support the statsd-specific metric for flushes

Link to tracking Issue: #24278

Testing: Tested locally using prometheus

$ nc -u -q0 localhost 8125 <<EOF
a:1|c
a:2|c
a:3|c
b:4|c
b:5|c
EOF
$ http :8888/metrics | grep -e '^otelcol.*statsd' -e '^otelcol.*sent.*debug'
otelcol_receiver_accepted_metric_points{receiver="statsd",service_instance_id="d9fcd320-9662-47ad-b6b4-e901e3b40592",service_name="collector",service_version="development"} 5
otelcol_receiver_statsd_flushed_metric_points{receiver="statsd",service_instance_id="d9fcd320-9662-47ad-b6b4-e901e3b40592",service_name="collector",service_version="development",status="success"} 2
otelcol_receiver_statsd_flushes{receiver="statsd",service_instance_id="d9fcd320-9662-47ad-b6b4-e901e3b40592",service_name="collector",service_version="development",status="success"} 1

otelcol_exporter_sent_metric_points{exporter="debug",service_instance_id="d9fcd320-9662-47ad-b6b4-e901e3b40592",service_name="collector",service_version="development"} 2

sirianni avatar Mar 19 '24 17:03 sirianni

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Apr 03 '24 05:04 github-actions[bot]

Pinging code owners @jmacd @dmitryax please take a look

codeboten avatar Apr 03 '24 21:04 codeboten

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Apr 26 '24 05:04 github-actions[bot]

@TylerHelmuth would you please review this? I stopped work on https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31822 in favor of this.

hardproblems avatar May 03 '24 19:05 hardproblems

Code owners @jmacd @dmitryax please review

TylerHelmuth avatar May 03 '24 21:05 TylerHelmuth

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar May 21 '24 05:05 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Jun 04 '24 05:06 github-actions[bot]