Skip to content

PrometheusReceiver ignores Summary and Histogram Metrics that do not have _sum counter. #2661

@sankala-dremio

Description

@sankala-dremio

Describe the bug
Summary and Histogram metrics exposed by frameworks like DropWizard do not track "_sum" counter and hence do not produce this in the output. When Prometheus receiver is run against such outputs, the histograms and Summaries are just ignored.

Steps to reproduce
A Simple Dropward application with a histogram metric and otelcollector with prometheus receiver.

What did you expect to see?
Expect to see the Histogram / Summary passed through the pipeline and available for exporters (with _sum as "0").

What did you see instead?
The Metric is dropped silently.

What version did you use?
Version: (v0.21.0)

What config did you use?
`receivers:
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: [ 'localhost:35599' ]
labels:
instance_type: gke_container
container_name: "${CONTAINER_NAME}"
namespace_id: "${NAMESPACE_NAME}"
pod_id: "${POD_NAME}"

processors:
batch:

exporters:
file:
path: /tmp/metrics.json

logging:
loglevel: debug
sampling_initial: 5
sampling_thereafter: 5

service:
pipelines:
metrics:
receivers: [prometheus]
processors: []
exporters: [logging, file]
`
Environment
OS: Debian
Docker image.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions