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

Histogram Buckets Are Not Cumulative #22263

Open
yaskinny opened this issue Jan 21, 2025 · 0 comments
Open

Histogram Buckets Are Not Cumulative #22263

yaskinny opened this issue Jan 21, 2025 · 0 comments
Labels
domain: metrics Anything related to Vector's metrics events type: bug A code related bug.

Comments

@yaskinny
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Histogram buckets are not cumulative. This is same as this bug i reported in promtail.

Configuration

this is not whole configuration and some parts are reducted but any part related to metrics exist.

transforms:
  logsToMetrics:
    type: log_to_metric
    inputs:
      - this
      - that
    metrics:
      - type: histogram
        field: response_time
        name: edges_requests_response_time
        increment_by_value: true
        tags:
          method: "{{ method }}"
          client_version: "{{ client_version }}"
          status: "{{ status }}"
          cache_status: "{{ cache_status }}"
          namespace: "{{ namespace }}"
          service_name: "{{ service_name }}"
          domain: "{{ domain }}"
          health: "{{ is_health }}"
          host: "{{ host }}"
  aggregateMetrics:
    type: aggregate
    inputs:
      - logsToMetrics
      - internalMetrics
    interval_ms: 5000

sinks:
  exposeMetrics:
    type: prometheus_exporter
    address: 0.0.0.0:9597
    buffer:
      type: memory
      max_events: 200000
    inputs:
      - aggregateMetrics
    buckets:
      - 0.005
      - 0.010
      - 0.015
      - 0.020
      - 0.030
      - 0.050
      - 0.075
      - 0.100
      - 0.150
      - 0.200
      - 0.300
      - 0.500
      - 0.750
      - 1.000
      - 1.500
      - 2.500
      - 4.000
      - 8.000
    flush_period_secs: 3600

Version

vector 0.44.0

Debug Output


Example Data

promql output:

my_metric_bucket{le="0.005",<other lables reducted>} 0
my_metric_bucket{le="0.01",<other lables reducted>} 1
my_metric_bucket{le="0.015",<other lables reducted>} 12
my_metric_bucket{le="0.02",<other lables reducted>} 17
my_metric_bucket{le="0.03",<other lables reducted>} 25
my_metric_bucket{le="0.05",<other lables reducted>} 39
my_metric_bucket{le="0.075",<other lables reducted>} 58
my_metric_bucket{le="0.1",<other lables reducted>} 70
my_metric_bucket{le="0.15",<other lables reducted>} 108
my_metric_bucket{le="0.2",<other lables reducted>} 128
my_metric_bucket{le="0.3",<other lables reducted>} 132
my_metric_bucket{le="0.5",<other lables reducted>} 144
my_metric_bucket{le="0.75",<other lables reducted>} 171
my_metric_bucket{le="1",<other lables reducted>} 176
my_metric_bucket{le="1.5",<other lables reducted>} 180
my_metric_bucket{le="2.5",<other lables reducted>} 180
my_metric_bucket{le="4",<other lables reducted>} 180
my_metric_bucket{le="8",<other lables reducted>} 180
my_metric_bucket{le="+Inf",<other lables reducted>} 182

here bucket 0.005 shouldn't be 0

Additional Context

No response

References

No response

@yaskinny yaskinny added the type: bug A code related bug. label Jan 21, 2025
@pront pront added the domain: metrics Anything related to Vector's metrics events label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: metrics Anything related to Vector's metrics events type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants