Skip to content

[probes.dns] latency_distribution doesn't work DNS probe #835

Closed

Description

@manugarg

Discussed in #833

Originally posted by therealak12 August 25, 2024
Hi, I have a simple yaml config as follows:

probe:
    - name: "google"
      type: DNS
      targets:
        host_names: "8.8.8.8"
      dns_probe:
        queryType: A
        resolved_domain: "google.com"
      latency_distribution:
        explicit_buckets: "0.001,0.005,0.01,0.02,0.03,0.05,0.075,0.1,0.2,0.5,0.75,1,1.5,2,2.5,3,4,5"
      interval: 1s
      timeout: 1s
      latency_unit: s

The issue is that only the last probe is recorded for the histogram metric. The /metrics endpoint always returns a response like this (count doesn't exceed 1):

latency_count{probe="ext-google",dst="8.8.8.8"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.001"} 0 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.005"} 0 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.01"} 0 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.02"} 0 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.03"} 0 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.05"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.075"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.1"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.2"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.5"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="0.75"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="1"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="1.5"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="2"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="2.5"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="3"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="4"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="5"} 1 1724571103875
latency_bucket{probe="ext-google",dst="8.8.8.8",le="+Inf"} 1 1724571103875

My question: Is this behavior intentional or can it be considered a bug?

This line is likely causing the behavior. It should be put in the Start method or should be changed like this:

if result.latency == nil {
    result.latency = p.opts.LatencyDist.CloneDist()
}
```</div>

Activity

  1. manugarg commented on Aug 25, 2024

    @manugarg
    ContributorAuthor

    @therealak12, which version you're running?

    I think you've found a bug in the unreleased version (which is great), but latest release should be okay.

    Context: I recently moved DNS probe to the common scheduler, but that expects metrics to be accumulated. Earlier DNS probe was using statskeeper (not retired), which took care of accumulating the metrics. So if you're using a released version it should be working ok.

  2. added this to the v0.13.7 milestone on Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions