Skip to content

fix(trace-stats)!: add grpc_method to aggregation key#2151

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
munir/grpc-method-aggregation-key
Jun 26, 2026
Merged

fix(trace-stats)!: add grpc_method to aggregation key#2151
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
munir/grpc-method-aggregation-key

Conversation

@mabdinur

@mabdinur mabdinur commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Removes `grpc_method` / `rpc.method` entirely from the OTLP trace metrics pipeline.

Previously `grpc_method` was a sidecar on `GroupedStats` — present in the OTLP metric payload as an explicit attribute, but not part of the aggregation key. This PR removes it from both:

  • `FixedAggregationKey` — it is no longer an aggregation dimension.
  • `OtlpExactGroup` — it is no longer carried in the per-cell sidecar.
  • `build_attributes()` — `rpc.method` is no longer emitted on OTLP histogram data points.

Rationale

For gRPC spans, `span.resource` already carries the full method path (e.g. `/package.Service/Method`). Emitting `rpc.method` as a separate OTLP attribute is redundant — `span.resource` (mapped to `span.name` on the data point) is the authoritative carrier of gRPC method identity and is already an aggregation dimension.

Adding `rpc.method` as a separate dimension would also increase cardinality for gRPC services without providing any information not already present on the metric.

Note: `rpc.response.status_code` (from `grpc.status.code`) is kept as a first-class aggregation dimension — it is not redundant with any existing field.

Motivation

Correctness and cleanliness for the OTLP trace metrics feature landed in #2067.

Risk

Breaking changes (major semver):

  • `FixedAggregationKey` loses its `grpc_method: T` field. Callers constructing the struct by name must remove the field.
  • `OtlpExactGroup` loses its `grpc_method` field.
  • `build_attributes()` loses the `grpc_method` parameter.

Blast radius is limited because:

  1. The OTLP trace metrics feature (feat(data-pipeline)!: export client-computed span stats as OTLP trace metrics #2067) landed on `main` after the v36 release (June 19). No released version is affected — this only exists in unreleased code.
  2. The OTLP metrics path is opt-in: the sidecar only activates it when `set_otlp_metrics_endpoint` is configured. No SDK enables this today.
  3. Agent `/v0.6/stats` protobuf wire format is unchanged — `ClientGroupedStats` has no `grpc_method` field.

Urgency: low. No live production systems are affected. This must land before the next release that ships the OTLP metrics feature.

How to test the change?

cargo nextest run -p libdd-trace-stats -p datadog-ipc -p libdd-data-pipeline

Spans with different gRPC methods were previously merged into the same
stats group (only the first span's method was kept). Adding grpc_method
to FixedAggregationKey ensures each method gets a separate bucket.

The OtlpExactGroup.grpc_method field is now sourced from the key rather
than a GroupedStats sidecar. The agent /v0.6/stats protobuf wire format
is unchanged (no grpc_method field in ClientGroupedStats).

SHM_VERSION bumped to 2 because FixedAggregationKey<StringRef> is
#[repr(C)] and the new field changes the layout; mismatched sidecar/worker
pairs will safely fail with a version-mismatch error.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@mabdinur
mabdinur requested review from a team as code owners June 22, 2026 17:38
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/munir/grpc-method-aggregation-key

Summary by Rule

Rule Base Branch PR Branch Change
unwrap_used 1 1 No change (0%)
Total 1 1 No change (0%)

Annotation Counts by File

File Base Branch PR Branch Change
libdd-data-pipeline/src/otlp/metrics.rs 1 1 No change (0%)

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 22 22 No change (0%)
datadog-live-debugger 4 4 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-sidecar 45 45 No change (0%)
libdd-common 13 13 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 6 6 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-remote-config 3 3 No change (0%)
libdd-telemetry 20 20 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 3 3 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 11 11 No change (0%)
Total 182 182 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be18c4394d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs Outdated
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jun 22, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

Metadata, docs and deps | dependency-check   View in Datadog   GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 73.93% (-0.02%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f54e2e7 | Docs | Datadog PR Page | Give us feedback!

@mabdinur mabdinur changed the title fix(trace-stats): add grpc_method to aggregation key fix(trace-stats)!: add grpc_method to aggregation key Jun 22, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 84.87 MB 84.86 MB -0% (-8.07 KB) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.82 MB 7.76 MB --.79% (-64.00 KB) 💪
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 96.00 MB 95.99 MB -0% (-8.34 KB) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.44 MB 10.44 MB -0% (-272 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.05 MB 25.05 MB -0% (-2.50 KB) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 87.68 KB 87.68 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 182.80 MB 182.80 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 936.10 MB 936.08 MB -0% (-18.82 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.20 MB 8.20 MB --.03% (-3.00 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 87.68 KB 87.68 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.23 MB 24.23 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 48.34 MB 48.34 MB --.01% (-6.92 KB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.71 MB 21.71 MB --.01% (-3.00 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 89.06 KB 89.06 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 186.80 MB 186.78 MB --.01% (-24.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 924.73 MB 924.71 MB -0% (-18.95 KB) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.33 MB 6.32 MB --.01% (-1.00 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 89.06 KB 89.06 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 25.99 MB 25.99 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 45.96 MB 45.96 MB -0% (-4.66 KB) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 75.64 MB 75.63 MB -0% (-6.43 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.68 MB 8.68 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 91.09 MB 91.09 MB -0% (-6.24 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.57 MB 10.57 MB -0% (-168 B) 👌

Bincode encodes struct fields positionally. Inserting grpc_method before
http_status_code shifted all subsequent field positions, breaking IPC
fallback decoding (OwnedShmSpanInput) between mismatched worker/sidecar
versions. Moving it to the end of the struct preserves all existing field
positions, so old-format IPC messages are decoded correctly up to the
grpc_method field; the decode then fails with EOF rather than silently
misinterpreting existing fields.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs Outdated
Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs

@VianneyRuhlmann VianneyRuhlmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some concerns regarding cardinality for non-otlp exporter otherwise LGTM

Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs Outdated
Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs Outdated
Comment thread libdd-trace-stats/src/span_concentrator/aggregation.rs Outdated
mabdinur and others added 2 commits June 25, 2026 15:10
…xport

span.resource already carries the full gRPC method path for gRPC spans
(e.g. /package.Service/Method). Adding grpc_method as a separate
aggregation dimension or OTLP attribute is redundant and adds cardinality.

Removes:
- grpc_method from FixedAggregationKey
- grpc_method from OtlpExactGroup
- rpc.method from the OTLP data-point attributes emitted by build_attributes
- GRPC_METHOD_FIELD constant and get_grpc_method() helper

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@mabdinur
mabdinur requested a review from a team as a code owner June 25, 2026 20:37
@mabdinur
mabdinur requested review from vpellan and removed request for a team June 25, 2026 20:37
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 53e20b5 into main Jun 26, 2026
172 of 173 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the munir/grpc-method-aggregation-key branch June 26, 2026 21:30
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Jun 29, 2026
## chore: release v37.0.0

Bumps the workspace version from `36.0.0` to `37.0.0` in `Cargo.toml` and regenerates `Cargo.lock`.

## Post-merge steps

1. Trigger the `create_release` job on GitLab — builds artifacts and creates a draft GitHub release.
2. Ask someone from `libdatadog-core` or `libdatadog-release` to publish the draft release.
3. Trigger the `release-proposal-dispatch` GitHub Actions workflow for per-crate crates.io publishing:
   crates: libdd-data-pipeline,libdd-trace-stats,libdd-trace-utils,libdd-ddsketch

## Notable changes since v36.0.0

- `feat(data-pipeline)`: export client-computed span stats as OTLP trace metrics (#2067)
- `feat(otel-thread-ctx)`: add self check capability (#2095)
- `fix(trace-stats)`: add `grpc_method` to aggregation key (#2151)
- `feat(data-pipeline)`: add stdout log trace exporter (#2074)
- `feat(remote-config)`: use the proto file from the agent (#2165)
- `feat(sidecar)`: expose `default_service_name` for `svc.*` process tags (#2053)
- feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091)

Co-authored-by: munir.abdinur <[email protected]>
iunanua added a commit that referenced this pull request Jul 7, 2026
…ibdd-data-pipeline, libdd-li... (#2201)

# Release proposal for libdd-capabilities-impl, libdd-common,
libdd-data-pipeline, libdd-library-config, libdd-remote-config,
libdd-sampling, libdd-telemetry, libdd-tinybytes, libdd-trace-utils and
their dependencies

This PR contains version bumps based on public API changes and commits
since last release.

## libdd-capabilities
**Next version:** `2.1.0`
**Semver bump:** `minor`
**Tag:** `libdd-capabilities-v2.1.0`

### Commits

- feat(data-pipeline)!: add stdout log trace exporter (#2074)

## libdd-common
**Next version:** `5.1.0`
**Semver bump:** `minor`
**Tag:** `libdd-common-v5.1.0`

### Commits

- refactor(clippy): prefer core and alloc imports (#2196)
- fix: update rustls-webpki to 0.103.13 (#2187)
- fix: update anyhow for unsoundness (#2186)
- feat(machine id): Add helpers in ddcommon to fetch the machine UUID l…
(#2163)

## libdd-ddsketch
**Next version:** `1.1.0`
**Semver bump:** `minor`
**Tag:** `libdd-ddsketch-v1.1.0`

### Commits

- feat(data-pipeline)!: export client-computed span stats as OTLP trace
metrics (#2067)
- test(ddsketch): add microbenchmarks for add/encode/collapse (#2125)

## libdd-trace-protobuf
**Next version:** `4.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-protobuf-v4.0.0`

### Commits

- chore!: update protobufs to be in sync with datadog-agent (#2180)
- feat(stats)!: add whole key cardinality limit (#2158)
- feat(remote-config)!: use the proto file from the agent (#2165)
- feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115)

## libdd-capabilities-impl
**Next version:** `3.0.0`
**Semver bump:** `major`
**Tag:** `libdd-capabilities-impl-v3.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.1.0 → ^5.1.0

### Commits

- feat(data-pipeline)!: add stdout log trace exporter (#2074)

## libdd-library-config
**Next version:** `3.0.0`
**Semver bump:** `major`
**Tag:** `libdd-library-config-v3.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0

### Commits

- refactor(clippy): prefer core and alloc imports (#2196)
- feat(library-config)!: caller-supplied threadlocal schema and extra
process-context attributes (#2162)
- fix(otel-thread-ctx): put the threadlocal attributes at the right
place in the context (#2167)

## libdd-remote-config
**Next version:** `2.0.0`
**Semver bump:** `major`
**Tag:** `libdd-remote-config-v2.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0

### Commits

- refactor(libdd-remote-config)!: hide Target inner properties so they
are not leaked (#2182)
- feat(remote-config)!: use the proto file from the agent (#2165)
- refactor(rc): reexport Endpoint and Tag common types (#2147)

## libdd-trace-normalization
**Next version:** `3.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-normalization-v3.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-protobuf`: ^3.0.1 → ^4.0.0

### Commits

- feat(data-pipeline)!: CSS Trace Filters (#1985)

## libdd-shared-runtime
**Next version:** `2.0.0`
**Semver bump:** `major`
**Tag:** `libdd-shared-runtime-v2.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.1.0 → ^5.1.0

### Commits

- feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061)
- feat(shared-runtime)!: use weak waker in trigger [APMSP-3371] (#2050)

## libdd-trace-utils
**Next version:** `9.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-utils-v9.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0

### Commits

- ci(miri): skip slow miri tests (#2188)
- chore!: update protobufs to be in sync with datadog-agent (#2180)
- feat(data-pipeline): add agentless export (#2081)
- feat(data-pipeline)!: add stdout log trace exporter (#2074)
- feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115)
- feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility
(#2091)
- test(trace-utils): add V05 msgpack decode microbenchmark (#2127)
- feat(data-pipeline)!: export client-computed span stats as OTLP trace
metrics (#2067)
- test(trace-utils): add VecMap microbenchmarks (#2126)
- chore(stats)!: submit p0 telemetry in stats (#2130)
- refactor(change-buffer)!: replace slot index with span_id, fix segment
isolation (#2105)
- feat(data-pipeline)!: CSS Trace Filters (#1985)
- feat(trace-exporter): add v1 span and its encoder (#2039)
- fix(trace-utils): mark decoded span maps as deduped (#2110)
- feat(trace-utils)!: change buffer implementation (#2055)
- feat(native-spans)!: change buffer foundation (#2046)
- refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct`
for v04 spans (#2043)
- test: fix timeouts on heavily contended scenarios (#2093)

## libdd-telemetry
**Next version:** `6.0.0`
**Semver bump:** `major`
**Tag:** `libdd-telemetry-v6.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-shared-runtime`: ^1.0.0 → ^2.0.0

### Commits

- ci(miri): skip slow miri tests (#2188)
- refactor(libdd-telemetry)!: avoid leaking libdd-common types in the
public API (#2152)
- feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061)

## libdd-trace-obfuscation
**Next version:** `5.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-obfuscation-v5.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0
- `libdd-trace-utils`: ^8.0.0 → ^9.0.0

### Commits

- refactor(clippy): prefer core and alloc imports (#2196)
- ci(miri): skip slow miri tests (#2188)
- fix: update anyhow for unsoundness (#2186)

## libdd-trace-stats
**Next version:** `6.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-stats-v6.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-shared-runtime`: ^1.0.0 → ^2.0.0
- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0
- `libdd-trace-utils`: ^8.0.0 → ^9.0.0

### Commits

- chore!: update protobufs to be in sync with datadog-agent (#2180)
- feat(stats)!: send telemetry for cardinality limits (#2159)
- feat(stats)!: add whole key cardinality limit (#2158)
- fix(trace-stats)!: add grpc_method to aggregation key (#2151)
- feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061)
- feat(data-pipeline)!: export client-computed span stats as OTLP trace
metrics (#2067)
- refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct`
for v04 spans (#2043)

## libdd-data-pipeline
**Next version:** `7.0.0`
**Semver bump:** `major`
**Tag:** `libdd-data-pipeline-v7.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-shared-runtime`: ^1.0.0 → ^2.0.0
- `libdd-telemetry`: ^5.0.1 → ^6.0.0
- `libdd-trace-protobuf`: ^3.0.2 → ^4.0.0
- `libdd-trace-stats`: ^5.0.0 → ^6.0.0
- `libdd-trace-utils`: ^8.0.0 → ^9.0.0

### Commits

- feat(trace_exporter): enable telemetry in stats exporter (#2160)
- refactor(libdd-telemetry)!: avoid leaking libdd-common types in the
public API (#2152)
- feat(stats): emit canonical gRPC status name for OTLP
rpc.response.status_code (#2183)
- feat(data-pipeline): add agentless export (#2081)
- feat(stats)!: send telemetry for cardinality limits (#2159)
- feat(stats)!: add whole key cardinality limit (#2158)
- fix(trace-stats)!: add grpc_method to aggregation key (#2151)
- feat(data-pipeline)!: add stdout log trace exporter (#2074)
- feat(shared-runtime)!: SharedRuntime Borrowed & Owned mode (#2061)
- feat(data-pipeline): OTLP HTTP/protobuf trace export (#2115)
- feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility
(#2091)
- feat(data-pipeline)!: export client-computed span stats as OTLP trace
metrics (#2067)
- chore(stats)!: submit p0 telemetry in stats (#2130)
- feat(data-pipeline)!: CSS Trace Filters (#1985)
- feat(shared-runtime)!: use weak waker in trigger [APMSP-3371] (#2050)
- refactor(span)!: use VecMap for `meta`, `metrics` and `meta_struct`
for v04 spans (#2043)
- feat(stats)!: add endpoint gating to client-side stats [APMSP-3361]
(#2040)

## libdd-dogstatsd-client
**Next version:** `4.0.0`
**Semver bump:** `major`
**Tag:** `libdd-dogstatsd-client-v4.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.1.0 → ^5.1.0


## libdd-sampling
**Next version:** `5.0.0`
**Semver bump:** `major`
**Tag:** `libdd-sampling-v5.0.0`

### ⚠️ major bump forced due to:

- `libdd-common`: ^4.2.0 → ^5.1.0
- `libdd-trace-utils`: ^8.0.0 → ^9.0.0


[APMSP-3371]:
https://datadoghq.atlassian.net/browse/APMSP-3371?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: iunanua <[email protected]>
taegyunkim pushed a commit that referenced this pull request Jul 8, 2026
# What does this PR do?

Removes \`grpc_method\` / \`rpc.method\` entirely from the OTLP trace metrics pipeline.

Previously \`grpc_method\` was a sidecar on \`GroupedStats\` — present in the OTLP metric payload as an explicit attribute, but not part of the aggregation key. This PR removes it from both:

- **\`FixedAggregationKey\`** — it is no longer an aggregation dimension.
- **\`OtlpExactGroup\`** — it is no longer carried in the per-cell sidecar.
- **\`build_attributes()\`** — \`rpc.method\` is no longer emitted on OTLP histogram data points.

## Rationale

For gRPC spans, \`span.resource\` already carries the full method path (e.g. \`/package.Service/Method\`). Emitting \`rpc.method\` as a separate OTLP attribute is redundant — \`span.resource\` (mapped to \`span.name\` on the data point) is the authoritative carrier of gRPC method identity and is already an aggregation dimension.

Adding \`rpc.method\` as a separate dimension would also increase cardinality for gRPC services without providing any information not already present on the metric.

Note: \`rpc.response.status_code\` (from \`grpc.status.code\`) is **kept** as a first-class aggregation dimension — it is not redundant with any existing field.

# Motivation

Correctness and cleanliness for the OTLP trace metrics feature landed in #2067.

# Risk

**Breaking changes (major semver):**

- \`FixedAggregationKey<T>\` loses its \`grpc_method: T\` field. Callers constructing the struct by name must remove the field.
- \`OtlpExactGroup\` loses its \`grpc_method\` field.
- \`build_attributes()\` loses the \`grpc_method\` parameter.

**Blast radius is limited** because:

1. The OTLP trace metrics feature (#2067) landed on \`main\` after the v36 release (June 19). No released version is affected — this only exists in unreleased code.
2. The OTLP metrics path is opt-in: the sidecar only activates it when \`set_otlp_metrics_endpoint\` is configured. No SDK enables this today.
3. Agent \`/v0.6/stats\` protobuf wire format is unchanged — \`ClientGroupedStats\` has no \`grpc_method\` field.

**Urgency: low.** No live production systems are affected. This must land before the next release that ships the OTLP metrics feature.

# How to test the change?

```
cargo nextest run -p libdd-trace-stats -p datadog-ipc -p libdd-data-pipeline
```

Co-authored-by: munir.abdinur <[email protected]>
Signed-off-by: Taegyun Kim <[email protected]>
taegyunkim pushed a commit that referenced this pull request Jul 8, 2026
## chore: release v37.0.0

Bumps the workspace version from `36.0.0` to `37.0.0` in `Cargo.toml` and regenerates `Cargo.lock`.

## Post-merge steps

1. Trigger the `create_release` job on GitLab — builds artifacts and creates a draft GitHub release.
2. Ask someone from `libdatadog-core` or `libdatadog-release` to publish the draft release.
3. Trigger the `release-proposal-dispatch` GitHub Actions workflow for per-crate crates.io publishing:
   crates: libdd-data-pipeline,libdd-trace-stats,libdd-trace-utils,libdd-ddsketch

## Notable changes since v36.0.0

- `feat(data-pipeline)`: export client-computed span stats as OTLP trace metrics (#2067)
- `feat(otel-thread-ctx)`: add self check capability (#2095)
- `fix(trace-stats)`: add `grpc_method` to aggregation key (#2151)
- `feat(data-pipeline)`: add stdout log trace exporter (#2074)
- `feat(remote-config)`: use the proto file from the agent (#2165)
- `feat(sidecar)`: expose `default_service_name` for `svc.*` process tags (#2053)
- feat(otlp)!: Export OTLP spans with attribute-level OTel compatibility (#2091)

Co-authored-by: munir.abdinur <[email protected]>
Signed-off-by: Taegyun Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants