Skip to content

feat(otlp): added support for summary, histogram, and exponential histogram #1319

Open
lucastemb wants to merge 16 commits intomainfrom
lucastemb/summary-metric
Open

feat(otlp): added support for summary, histogram, and exponential histogram #1319
lucastemb wants to merge 16 commits intomainfrom
lucastemb/summary-metric

Conversation

@lucastemb
Copy link
Copy Markdown

Summary

This PR adds supports for the remaining open telemetry metrics (summary, histogram, and exponential histogram).

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

I created a draft PR in the lading repo that included the appropriate changes to emit the newly added metrics.

I had my Cargo.toml point to the branch and ran make build-datadog-intake-image build-millstone-image build-datadog-agent-image and make test-correctness which yielded the following results:

2026-04-07T20:52:54.164747Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/dsd-plain/config.yaml'.
2026-04-07T20:52:54.164804Z  INFO ground_truth: Test run starting...
2026-04-07T20:52:54.164890Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:52:54.164904Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/QC8smTa1
2026-04-07T20:52:54.165404Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/sTsNyjwJ
2026-04-07T20:53:17.025257Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:53:54.665292Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:53:56.963274Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:53:56.963322Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:53:56.974946Z  INFO ground_truth::analysis::metrics: Analyzing 3095 unfiltered metrics from baseline target, and 3095 unfiltered metrics from comparison target.
2026-04-07T20:53:56.979673Z  INFO ground_truth::analysis::metrics: Filtered 67 internal telemetry metric(s) from baseline, and 67 internal telemetry metric(s) from comparison.
2026-04-07T20:53:56.981558Z  INFO ground_truth::analysis::metrics: Baseline and comparison both emitted the same set of 3028 unique metrics. Continuing...
2026-04-07T20:53:56.984571Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:53:56.984586Z  INFO ground_truth: ground-truth stopped.
[*] Running 'dsd-origin-detection' correctness test case...
2026-04-07T20:53:57.600962Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/dsd-origin-detection/config.yaml'.
2026-04-07T20:53:57.600989Z  INFO ground_truth: Test run starting...
2026-04-07T20:53:57.601028Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:53:57.601036Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/Ulzgl0hU
2026-04-07T20:53:57.601180Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/hJrERcxw
2026-04-07T20:54:17.630782Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:54:54.133377Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:54:56.431092Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:54:56.431109Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:54:56.437142Z  INFO ground_truth::analysis::metrics: Analyzing 3095 unfiltered metrics from baseline target, and 3095 unfiltered metrics from comparison target.
2026-04-07T20:54:56.440374Z  INFO ground_truth::analysis::metrics: Filtered 67 internal telemetry metric(s) from baseline, and 67 internal telemetry metric(s) from comparison.
2026-04-07T20:54:56.442996Z  INFO ground_truth::analysis::metrics: Baseline and comparison both emitted the same set of 3028 unique metrics. Continuing...
2026-04-07T20:54:56.447243Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:54:56.447257Z  INFO ground_truth: ground-truth stopped.
[*] Running 'otlp-metrics' correctness test case...
2026-04-07T20:54:57.125483Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/otlp-metrics/config.yaml'.
2026-04-07T20:54:57.125510Z  INFO ground_truth: Test run starting...
2026-04-07T20:54:57.125550Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:54:57.125558Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/7S9Ofk63
2026-04-07T20:54:57.125678Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/3A4ZVXYw
2026-04-07T20:55:17.473838Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:55:58.954998Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:56:01.257443Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:56:01.257478Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:56:01.980027Z  INFO ground_truth::analysis::metrics: Analyzing 3106 unfiltered metrics from baseline target, and 3104 unfiltered metrics from comparison target.
2026-04-07T20:56:02.014712Z  INFO ground_truth::analysis::metrics: Filtered 69 internal telemetry metric(s) from baseline, and 67 internal telemetry metric(s) from comparison.
2026-04-07T20:56:02.019094Z  INFO ground_truth::analysis::metrics: Baseline and comparison both emitted the same set of 3037 unique metrics. Continuing...
2026-04-07T20:56:02.241589Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:56:02.241605Z  INFO ground_truth: ground-truth stopped.
[*] Running 'otlp-traces' correctness test case...
2026-04-07T20:56:03.007379Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/otlp-traces/config.yaml'.
2026-04-07T20:56:03.007406Z  INFO ground_truth: Test run starting...
2026-04-07T20:56:03.007444Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:56:03.007451Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/1cVwBPah
2026-04-07T20:56:03.007577Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/wUNiWwV6
2026-04-07T20:56:23.276549Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:57:03.869534Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:57:06.178544Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:57:06.178560Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:57:06.184466Z  INFO ground_truth::analysis::traces: Analyzing 2000 traces (4096 spans) from baseline and comparison target.
2026-04-07T20:57:06.234992Z  INFO ground_truth::analysis::traces: Analyzing 52 aggregated statistics groups from baseline and comparison target.
2026-04-07T20:57:06.239324Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:57:06.239335Z  INFO ground_truth: ground-truth stopped.
[*] Running 'otlp-traces-ottl-filtering' correctness test case...
2026-04-07T20:57:06.278783Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/otlp-traces-ottl-filtering/config.yaml'.
2026-04-07T20:57:06.278797Z  INFO ground_truth: Test run starting...
2026-04-07T20:57:06.278819Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:57:06.278822Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/ygy0OQ1f
2026-04-07T20:57:06.278939Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/AmhuzMjv
2026-04-07T20:57:39.420798Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:58:13.764492Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:58:16.096143Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:58:16.096210Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:58:16.105198Z  INFO ground_truth::analysis::traces: Analyzing 1000 traces (2096 spans) from baseline and comparison target.
2026-04-07T20:58:16.141387Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:58:16.141407Z  INFO ground_truth: ground-truth stopped.
[*] Running 'otlp-traces-ottl-transform' correctness test case...
2026-04-07T20:58:16.812249Z  INFO ground_truth: Loaded test case configuration from '/Users/lucas.tembras/saluki/test/correctness/otlp-traces-ottl-transform/config.yaml'.
2026-04-07T20:58:16.812272Z  INFO ground_truth: Test run starting...
2026-04-07T20:58:16.812303Z  INFO ground_truth::runner: Spawning containers for baseline and comparison targets...
2026-04-07T20:58:16.812308Z  INFO ground_truth::runner: Creating test group runner for target 'baseline'. Logs will be saved to /tmp/ground-truth/DCexIxKF
2026-04-07T20:58:16.812427Z  INFO ground_truth::runner: Creating test group runner for target 'comparison'. Logs will be saved to /tmp/ground-truth/6KiZgYPM
2026-04-07T20:58:51.020236Z  INFO ground_truth::runner: Containers spawned successfully. Waiting for data...
2026-04-07T20:59:33.373262Z  INFO ground_truth::runner: Cleaning up remaining containers and resources...
2026-04-07T20:59:35.683447Z  INFO ground_truth::runner: Cleanup complete.
2026-04-07T20:59:35.683463Z  INFO ground_truth: Test run complete. Analyzing results...
2026-04-07T20:59:35.688473Z  INFO ground_truth::analysis::traces: Analyzing 2000 traces (4096 spans) from baseline and comparison target.
2026-04-07T20:59:35.745793Z  INFO ground_truth: Analysis complete: no difference detected between baseline and comparison.
2026-04-07T20:59:35.745809Z  INFO ground_truth: ground-truth stopped.

References

@lucastemb lucastemb requested a review from a team as a code owner April 7, 2026 21:11
@dd-octo-sts dd-octo-sts bot added area/core Core functionality, event model, etc. area/components Sources, transforms, and destinations. source/otlp OTLP source. labels Apr 7, 2026
@lucastemb lucastemb changed the title feat(otlp metrics): added support for summary, histogram, and exponential histogram feat(otlp): added support for summary, histogram, and exponential histogram Apr 7, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 7, 2026

Binary Size Analysis (Agent Data Plane)

Target: 1fec9ae (baseline) vs a51ff19 (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 26.55 MiB
Comparison Size: 26.60 MiB
Size Change: +48.73 KiB (+0.18%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols
saluki_components::sources::otlp +26.61 KiB 25
core +11.20 KiB 34
saluki_context::resolver::ContextResolver +3.88 KiB 1
anyhow +2.41 KiB 9
ddsketch::canonical::store +1.11 KiB 1
[sections] +1.09 KiB 8
[Unmapped] +784 B 1
exp2 +543 B 1
ddsketch::agent::sketch +324 B 3
alloc +262 B 55
std +208 B 16
floor +174 B 1
__powidf2 +156 B 1
serde_core +70 B 1
aho_corasick -16 B 1
mlkem512_dec -16 B 1
[LOAD #3 [RW]] +8 B 1
agent_data_plane::cli::run +8 B 1
unicode_segmentation -8 B 1
agent_data_plane::components::tag_filterlist -4 B 1

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +24.2Ki  [NEW] +24.1Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::new::h0c0f217e5f83abe1
  +1.1% +16.9Ki  +1.1% +12.1Ki    [224 Others]
  [NEW] +16.3Ki  [NEW] +16.2Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::map_histogram_metrics::h516742a8e963419f
  [NEW] +11.6Ki  [NEW] +11.4Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::map_to_dd_format::hde1e20c70359a11d
  [NEW] +5.13Ki  [NEW] +5.00Ki    <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11405
  [NEW] +4.71Ki  [NEW] +4.59Ki    <rustls::error::Error as core::clone::Clone>::clone.11420
  [NEW] +3.88Ki  [NEW] +3.78Ki    saluki_context::resolver::ContextResolver::resolve::h4e000b719a42af9d
  [NEW] +3.83Ki  [NEW] +3.71Ki    <webpki::error::Error as core::fmt::Debug>::fmt.11598
  [NEW] +3.57Ki  [NEW] +3.45Ki    <rustls::error::Error as core::fmt::Debug>::fmt.11421
  [NEW] +3.41Ki  [NEW] +3.32Ki    core::slice::sort::stable::quicksort::quicksort::h0083a43a153462bc
  [NEW] +2.32Ki  [NEW] +2.23Ki    core::slice::sort::unstable::quicksort::quicksort::hd2eaa63094f11709
  [NEW] +1.98Ki  [NEW] +1.90Ki    core::slice::sort::stable::drift::sort::h18e45b0a82c1a3a0
  [NEW] +1.79Ki  [NEW] +1.65Ki    <tonic::transport::channel::endpoint::Endpoint as core::clone::Clone>::clone.13182
  [DEL] -1.79Ki  [DEL] -1.65Ki    <tonic::transport::channel::endpoint::Endpoint as core::clone::Clone>::clone.13180
  [DEL] -3.57Ki  [DEL] -3.45Ki    <rustls::error::Error as core::fmt::Debug>::fmt.11419
  [DEL] -3.83Ki  [DEL] -3.71Ki    <webpki::error::Error as core::fmt::Debug>::fmt.11596
 -79.3% -3.83Ki -81.7% -3.83Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::record_metric_event::h4c5cbdb89ee79abd
  [DEL] -3.83Ki  [DEL] -3.69Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::map_to_dd_format::h504d386aa98922b6
  [DEL] -4.71Ki  [DEL] -4.59Ki    <rustls::error::Error as core::clone::Clone>::clone.11418
  [DEL] -5.13Ki  [DEL] -5.00Ki    <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11403
  [DEL] -24.2Ki  [DEL] -24.1Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::new::h9fff571cb4fb1d98
  +0.2% +48.7Ki  +0.2% +43.4Ki    TOTAL

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 7, 2026

Regression Detector (Agent Data Plane)

Regression Detector Results

Run ID: 558082e4-30d7-4758-bb43-44bde4b9725c

Baseline: 1fec9ae
Comparison: a51ff19
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
otlp_ingest_logs_5mb_memory memory utilization +3.27 [+2.93, +3.61] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization +0.27 [-4.72, +5.27] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput +0.01 [-0.11, +0.13] 1 (metrics) (profiles) (logs)

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_512kb_3k_contexts_cpu % cpu utilization +7.14 [-51.90, +66.17] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_cpu % cpu utilization +4.34 [-51.96, +60.65] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_memory memory utilization +3.27 [+2.93, +3.61] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_cpu % cpu utilization +3.26 [+1.06, +5.46] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_cpu % cpu utilization +2.48 [-28.94, +33.90] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_cpu % cpu utilization +2.01 [-0.06, +4.08] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_cpu % cpu utilization +1.53 [-5.58, +8.64] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_cpu % cpu utilization +0.54 [-5.43, +6.51] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_memory memory utilization +0.51 [+0.17, +0.85] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_throughput ingress throughput +0.32 [+0.19, +0.45] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_memory memory utilization +0.30 [+0.06, +0.55] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_cpu % cpu utilization +0.30 [-1.10, +1.70] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory utilization +0.27 [+0.08, +0.46] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization +0.27 [-4.72, +5.27] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_memory memory utilization +0.15 [-0.02, +0.32] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_memory memory utilization +0.14 [-0.11, +0.39] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_throughput ingress throughput +0.04 [-0.09, +0.16] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput +0.01 [-0.11, +0.13] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory utilization +0.01 [-0.17, +0.20] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_throughput ingress throughput +0.01 [-0.03, +0.05] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_memory memory utilization +0.01 [-0.18, +0.19] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_throughput ingress throughput +0.01 [-0.14, +0.15] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_throughput ingress throughput +0.00 [-0.01, +0.02] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_throughput ingress throughput +0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_throughput ingress throughput +0.00 [-0.05, +0.05] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_throughput ingress throughput -0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_throughput ingress throughput -0.00 [-0.06, +0.06] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory utilization -0.03 [-0.15, +0.10] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_memory memory utilization -0.04 [-0.21, +0.14] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_memory memory utilization -0.05 [-0.29, +0.20] 1 (metrics) (profiles) (logs)
quality_gates_rss_idle memory utilization -0.06 [-0.09, -0.03] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_memory memory utilization -0.08 [-0.26, +0.10] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_heavy memory utilization -0.23 [-0.36, -0.10] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_memory memory utilization -0.48 [-0.65, -0.31] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_cpu % cpu utilization -0.93 [-3.38, +1.51] 1 (metrics) (profiles) (logs)

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed observed_value links
quality_gates_rss_dsd_heavy memory_usage 10/10 115.55MiB ≤ 140MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory_usage 10/10 34.46MiB ≤ 50MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory_usage 10/10 54.20MiB ≤ 75MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 167.95MiB ≤ 200MiB (metrics) (profiles) (logs)
quality_gates_rss_idle memory_usage 10/10 21.50MiB ≤ 40MiB (metrics) (profiles) (logs)

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for three previously unimplemented OpenTelemetry metric types: Summary metrics, Histogram metrics with bucket conversion to sketches, and Exponential Histogram metrics. The implementation includes new metric mapping functions, DDSketch conversion utilities, and metric metadata enhancements to support interval tracking for delta metrics. Comprehensive correctness testing was performed using the lading repository's test suite, which confirmed that the implementation produces metrics consistent with the baseline.

Changes:

  • Added map_summary_metrics() to handle OTLP Summary data points with optional quantile emission based on configuration
  • Added map_exponential_histogram_metrics() to convert OTLP ExponentialHistogram to agent DDSketch format, supporting delta metrics only
  • Added helper functions for DDSketch manipulation: exponential_histogram_to_ddsketch(), convert_ddsketch_into_sketch(), remap_bins_to_agent_space() to support exponential histogram conversion
  • Enhanced DDSketch library with setter methods (set_count, set_sum, set_avg, set_min, set_max) and new LogarithmicMapping::new_with_gamma() constructor for explicit gamma configuration
  • Added interval field to MetricMetadata to track the collection interval for delta metrics (used for consistency with Go agent's ConsumeSketch behavior)
  • Added configuration options quantiles, infer_delta_interval, and validation logic

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/saluki-core/src/data_model/event/metric/value/sketch.rs Added From<(u64, DDSketch)> implementation for direct sketch-with-timestamp conversion
lib/saluki-core/src/data_model/event/metric/metadata.rs Added interval field and with_interval() builder method for metric collection interval tracking
lib/saluki-components/src/sources/otlp/metrics/translator.rs Implemented summary and exponential histogram metric mapping with bucket-to-sketch conversion utilities
lib/saluki-components/src/sources/otlp/metrics/config.rs Added new configuration fields for quantiles and interval inference; added validation method
lib/ddsketch/src/canonical/mapping/logarithmic.rs Added new_with_gamma() constructor for direct gamma-based mapping creation
lib/ddsketch/src/agent/sketch.rs Added setter methods to override count, sum, avg, min, and max values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -121,13 +135,15 @@ impl Default for OtlpMetricsTranslatorConfig {
fn default() -> Self {
Self {
hist_mode: HistogramMode::default(),
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value of send_histogram_aggregations was changed from true to false in this PR. This is a significant behavioral change that affects histogram processing for all existing code using the default configuration. While the validation tests pass, this change should be explicitly justified and documented, as it alters the default metric output behavior. Consider adding a comment explaining why this default was changed.

Suggested change
hist_mode: HistogramMode::default(),
hist_mode: HistogramMode::default(),
// Intentionally disabled by default because enabling histogram aggregations
// changes the default metric output for callers relying on the translator's
// default configuration.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, the Agent sets send_histogram_aggregations to false. I changed the Rust code to mimic that.

@lucastemb lucastemb requested a review from tobz April 8, 2026 22:30
…al field, added log for non-delta temporality, cleaner error reporting
@lucastemb lucastemb requested a review from tobz April 9, 2026 20:25
@tobz
Copy link
Copy Markdown
Member

tobz commented Apr 10, 2026

As a reminder, we'll still need to get the lading PR reviewed and merged so we can switch over our dependency, and actually ensure correctness tests still pass before we can demonstrate fully that we're supporting all OTLP metrics correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. area/core Core functionality, event model, etc. source/otlp OTLP source.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants