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

[receiver/statsd] Missing obsreport metrics from statsdreceiver #24278

Closed
sirianni opened this issue Jul 14, 2023 · 10 comments
Closed

[receiver/statsd] Missing obsreport metrics from statsdreceiver #24278

sirianni opened this issue Jul 14, 2023 · 10 comments
Labels
bug Something isn't working receiver/statsd statsd related issues

Comments

@sirianni
Copy link
Contributor

sirianni commented Jul 14, 2023

Component(s)

receiver/statsd

What happened?

Description

The statsdreceiver does not properly expose obsreport metrics.

Steps to Reproduce

Send some OTLP and statsd metrics to a collector configured with both receivers.

Expected Result

I should see otelcol_receiver_accepted_metric_points_total timeseries for both receivers.

Actual Result

I see only a otelcol_receiver_accepted_metric_points_total timeseries for the otlp receiver.

$ curl http://localhost:8888/metrics | grep accepted_metric
# HELP otelcol_receiver_accepted_metric_points_total Number of metric points successfully pushed into the pipeline.
# TYPE otelcol_receiver_accepted_metric_points_total counter
otelcol_receiver_accepted_metric_points_total{receiver="otlp",transport="grpc"} 41

Collector version

v0.81.0

Environment information

Environment

Linux

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      grpc:
  statsd:
exporters:
  logging:
    verbosity: detailed
service:
  telemetry:
    logs:
      level: DEBUG
      development: true
      encoding: console
  pipelines:
    metrics:
      receivers:
      - statsd
      - otlp
      processors: []
      exporters:
      - logging

Log output

2023-07-14T17:12:54.340-0400    info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "resource metrics": 1, "metrics": 1, "data points": 1}
2023-07-14T17:12:54.341-0400    info    ResourceMetrics #0
Resource SchemaURL: 
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope otelcol/statsdreceiver development
Metric #0
Descriptor:
     -> Name: synthetic.counter
     -> Description: 
     -> Unit: 
     -> DataType: Sum
     -> IsMonotonic: false
     -> AggregationTemporality: Delta
NumberDataPoints #0
Data point attributes:
     -> library: Str(statsd)
StartTimestamp: 2023-07-14 21:11:54.340264544 +0000 UTC
Timestamp: 2023-07-14 21:12:54.34085576 +0000 UTC
Value: 1
        {"kind": "exporter", "data_type": "metrics", "name": "logging"}

Additional context

The receiver does seem to be instrumented with obsreport

r.obsrecv.EndMetricsOp(ctx, "statsd", numReceivedMessages, err)
so maybe there is a more subtle bug somewhere.

@sirianni sirianni added bug Something isn't working needs triage New item requiring triage labels Jul 14, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@github-actions github-actions bot added the receiver/statsd statsd related issues label Jul 14, 2023
@atoulme atoulme removed the needs triage New item requiring triage label Jul 14, 2023
@sirianni
Copy link
Contributor Author

Looks like the call to reporter.OnMetricsProcessed() was removed here

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Sep 13, 2023
@atoulme atoulme removed the Stale label Sep 15, 2023
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Nov 14, 2023
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@hardproblems
Copy link
Contributor

I'd like to reopen this issue as we need some metrics for the receiver to monitor it in production (right now there is none)

@hardproblems
Copy link
Contributor

/label receiver/statsd -Stale

Copy link
Contributor

Pinging code owners for receiver/statsd: @jmacd @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@sirianni
Copy link
Contributor Author

I opened #31839 to address this. We are already using this code in production.

@dmitryax dmitryax reopened this May 3, 2024
dmitryax pushed a commit that referenced this issue Jun 11, 2024
Description:
Add received statsd / accepted/refused metrics to statsdreceiver

Resurrecting
#31822
since #31839 is closed.

Link to tracking Issue:

#24278

Testing:
This works in our internal testing environments. Took a profile and
didn't see metric recording taking much cpu
@dmitryax
Copy link
Member

Resolved by #33415

t00mas pushed a commit to t00mas/opentelemetry-collector-contrib that referenced this issue Jun 18, 2024
Description:
Add received statsd / accepted/refused metrics to statsdreceiver

Resurrecting
open-telemetry#31822
since open-telemetry#31839 is closed.

Link to tracking Issue:

open-telemetry#24278

Testing:
This works in our internal testing environments. Took a profile and
didn't see metric recording taking much cpu
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jul 11, 2024
Description:
Add received statsd / accepted/refused metrics to statsdreceiver

Resurrecting
open-telemetry#31822
since open-telemetry#31839 is closed.

Link to tracking Issue:

open-telemetry#24278

Testing:
This works in our internal testing environments. Took a profile and
didn't see metric recording taking much cpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/statsd statsd related issues
Projects
None yet
Development

No branches or pull requests

4 participants