OpenMetrics — Histogram Exemplars Linking to the Trace Fixtures (prom)
Histogram buckets carrying exemplars whose trace_id and span_id resolve against the OTLP trace fixtures in this category — the exact-to-example link that turns a latency spike on a graph into a specific request. Five exemplars, each with its own observed value and timestamp.
# TYPE http_request_duration_seconds histogram
# UNIT http_request_duration_seconds seconds
# HELP http_request_duration_seconds Latency with exemplars linking to real traces.
http_request_duration_seconds_bucket{service="checkout-api",le="0.005"} 12
http_request_duration_seconds_bucket{service="checkout-api",le="0.01"} 341
http_request_duration_seconds_bucket{service="checkout-api",le="0.025"} 2210
http_request_duration_seconds_bucket{service="checkout-api",le="0.05"} 7412 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736",span_id="2b3c4d5e6f708192"} 0.0412 1773738872.850
http_request_duration_seconds_bucket{service="checkout-api",le="0.1"} 15908 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736",span_id="5e6f708192a3b4c5"} 0.0871 1773738872.850
http_request_duration_seconds_bucket{service="checkout-api",le="0.25"} 21744
http_request_duration_seconds_bucket{service="checkout-api",le="0.5"} 23511 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736",span_id="8192a3b4c5d6e7f8"} 0.1482 1773738872.850
http_request_duration_seconds_bucket{service="checkout-api",le="1.0"} 24102 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736",span_id="a3b4c5d6e7f8091a"} 0.9013 1773738872.850
http_request_duration_seconds_bucket{service="checkout-api",le="2.5"} 24398
http_request_duration_seconds_bucket{service="checkout-api",le="5.0"} 24487
http_request_duration_seconds_bucket{service="checkout-api",le="10.0"} 24512
http_request_duration_seconds_bucket{service="checkout-api",le="+Inf"} 24518 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736",span_id="00f067aa0ba902b7"} 2.0031 1773738872.850
http_request_duration_seconds_count{service="checkout-api"} 24518
http_request_duration_seconds_sum{service="checkout-api"} 3418.2214
# EOF
Specifications
- Exemplars
- 5
- Linked Trace Id
- 4bf92f3577b34da6a3ce929d0e0e4736
- Buckets
- 12
- Exemplar Labels
- trace_id, span_id
- Dialect
- OpenMetrics 1.0
- Resolves Against
- otlp-json-trace-checkout
Testing contract
Expected to pass- Scenario
- Parse the exemplars and follow each trace_id into the trace fixtures.
- Expected result
- Five exemplars are extracted with values and timestamps, and every span_id resolves to a real span inside trace 4bf92f3577b34da6a3ce929d0e0e4736.
What is a .prom file?
A .prom file holds metrics in the Prometheus text exposition format, the same body a `/metrics` endpoint returns. Each metric family is introduced by `# HELP` and `# TYPE` comments and followed by one sample per line: a metric name, an optional brace-delimited label set, a value, and an optional millisecond timestamp. Counters, gauges, histograms (with `_bucket`, `_sum`, `_count` series and a `+Inf` bucket), and summaries with quantile labels all use this one grammar.
How to use this file
Use an example .prom file to test exposition-format parsers, scrapers, and the node_exporter textfile collector — checking label escaping, histogram bucket ordering and cumulative counts, and the handling of `NaN` and `+Inf` values.
How to use this file for testing
“OpenMetrics — Histogram Exemplars Linking to the Trace Fixtures (prom)” is a deterministic Novus Examples fixture for Observability, Time-series data, JSON parsing. Structured and plain-text telemetry with known timestamps, levels, request identifiers, and error states for testing log ingestion, correlation, dashboards, and alert pipelines.
Documented properties for this file: PROM · 1,715 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Telemetry fixtures use fixed trace IDs, span IDs, and timestamps so ingestion is reproducible run to run. Point your collector, parser, or query layer at the file and assert the documented span tree, metric families, or severity mix; service and host names are invented.
Related files
- jsonOTLP Metrics — Exemplars with Trace and Span IDs (json)An OTLP histogram carrying two exemplars, each with the trace and span ID of a request that landed in that bucket — including the 2.0031-second outlier that corresponds to the failed payment in the error-trace fixture. The metrics-to-traces jump, with a resolvable target.

- jsonOTLP Metrics — Monotonic Sum and Gauge Data Points (json)An OTLP metrics export with a monotonic cumulative sum and two gauges, showing the parts of the wire format that trip parsers: int data points serialised as JSON strings, UCUM unit annotations like {request} and By, and the start timestamp that makes a counter reset detectable.

- jsonPrometheus HTTP API — query_range Matrix Response (json)A Prometheus /api/v1/query_range response: three labelled series of 30 points each at a 60-second step, with sample values as JSON strings and timestamps as float seconds. The exact envelope a dashboard client has to unpack, including the string-typed values that break naive charting code.

- csvMetric Range Export — Long (Tidy) CSV (csv)The same 90 samples as the query_range response, exported one row per observation with both epoch and ISO 8601 timestamps. The long layout every dataframe library prefers, and half of a reshaping pair.

- csvMetric Range Export — Wide (Pivoted) CSV (csv)The same 90 samples pivoted to one column per service and one row per timestamp — the layout a spreadsheet chart expects. Paired with the long-format export so a reshape can be scored in both directions.

- jsonOTLP Metrics — Base-2 Exponential Histogram (json)An exponential histogram at scale 3 — eight buckets per power of two — with a negative offset, a zero bucket and its threshold. Bucket i covers (base^(offset+i), base^(offset+i+1)], and getting that indexing wrong silently shifts every percentile, which is what this fixture is for.

Generated by generation/observability.py. Free for any use, no attribution required — license.