Skip to content

OpenTelemetry MetricsTools

Tore Nestenius edited this page Dec 29, 2024 · 2 revisions

Metrics Tools

The Cloud Debugger provides tools designed for exploring and understanding **OpenTelemetry **metrics. These tools generate sample metrics data, allowing you to experiment with how metrics are handled in OpenTelemetry and observe the process of exporting this data to external systems for further analysis. The tools include counters and histograms, each offering two variations for flexible exploration.


Counters

Counters are used to track cumulative totals, providing a simple way to explore metrics related to event counts or usage patterns in your application.

Purpose

Counters help you understand how OpenTelemetry metrics capture and tag events over time. They allow you to observe how different tags affect the recorded data and follow the metrics as they are processed and exported.

Available Counters

  1. Simple Counter

    • Will increment this counter by one each time the button is clicked.
    • Includes tags like user.id and operation.name to provide context about each recorded action.
  2. Advanced Counter

    • Similar to the simple counter but adds a dynamic country tag, randomly selected from predefined countries such as Sweden, Denmark, Norway, and Finland.

Histograms

Histograms measure and group numeric data into predefined ranges, enabling you to explore the distribution of values in performance metrics or other datasets.

Available Histograms

  1. Standard Histogram

    • Uses default bucket boundaries to group recorded values.
  2. Advanced Histogram

    • Uses custom bucket boundaries ranging from 0 to 1000.
    • The bucket boundaries are [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]

Sample Data

This is the data that is recorded by the histograms in this tool:

Value Occurrences
50 1
150 2
250 4
350 8
450 16
550 32
650 64
750 128
850 256
950 512

This pattern demonstrates how values are grouped into predefined buckets with occurrences increasing in powers of two. Making it easy to recognize in the output.


Exporting Metrics

Both counters and histograms are integrated with OpenTelemetry’s export pipeline. By using the Cloud Debugger’s metrics tools, you can observe how metrics data is:

  1. Captured and tagged using counters or histograms.
  2. Processed and aggregated within the OpenTelemetry pipeline.
  3. Exported to external systems like Prometheus or Azure Monitor for analysis and visualization.
Clone this wiki locally