Skip to content

feat(metrics): destVersion label on per-destination transform metrics - #5319

Merged
saikumarrs merged 1 commit into
developfrom
feature/int-6576-rudder-transformer-version-metric-label-on-per-destination
Jun 26, 2026
Merged

saikumarrs merged 1 commit into
developfrom
feature/int-6576-rudder-transformer-version-metric-label-on-per-destination

Conversation

@saikumarrs

@saikumarrs saikumarrs commented Jun 25, 2026 •

Copy link
Copy Markdown
Member

What

Low-cardinality observability follow-up (INT-6576) — emit the integration major as a destVersion label on the per-destination transform metrics, so adoption / per-version error & latency / retirement-readiness are sliceable by major. Label-wiring only, no data-path change.

  • destVersion label on dest_transform_input_events + dest_transform_output_events (processor + router paths), read from events[0]?.destination?.version.
  • Registered in the prometheus labelset (src/util/prometheus.js) — prom-client rejects labels absent from a metric's initial labelset.

Scope

Scoped to the two transform-event histograms (where destination.version is in scope in the controller). The other candidates were deliberately left out: event_transform_success/failure and outgoing_request_* need cross-cutting threading through getTags/MetaTransferObject/network.js; tf_proxy_*, transformer_proxy_*, dest_transform_requests, and v0_transformation_time are defined but never emitted.

Stacked on

Built on top of #5318 (INT-6495 — version? on the Destination type). Base branch is that PR's branch; this metric reads the field it adds. Review/merge #5318 first.

Testing

  • test_destination component run: histograms emit with destVersion; prom-client raises no "label not in initial labelset" error. webhook smoke 23/23 (no regression).
  • Full pre-commit suite (test:ts + test:js + lint) green.

References

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@saikumarrs, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 15 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cbdc59ca-9639-4d1a-b5fc-75da72da8da7

📥 Commits

Reviewing files that changed from the base of the PR and between ec450b8 and de80f07.

📒 Files selected for processing (2)
  • src/controllers/destination.ts
  • src/util/prometheus.js

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "auto_resolve_threads"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/int-6576-rudder-transformer-version-metric-label-on-per-destination

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.70%. Comparing base (ec450b8) to head (de80f07).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5319   +/-   ##
========================================
  Coverage    92.70%   92.70%           
========================================
  Files          700      700           
  Lines        37970    37970           
  Branches      8863     8904   +41     
========================================
  Hits         35199    35199           
+ Misses        2561     2543   -18     
- Partials       210      228   +18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@saikumarrs
saikumarrs force-pushed the feature/int-6576-rudder-transformer-version-metric-label-on-per-destination branch 2 times, most recently from e06cd71 to 282e23c Compare June 26, 2026 09:04
@saikumarrs
saikumarrs marked this pull request as ready for review June 26, 2026 09:11
@saikumarrs
saikumarrs requested review from a team as code owners June 26, 2026 09:11
@saikumarrs
saikumarrs requested review from achettyiitr and krishna2020 and removed request for a team June 26, 2026 09:11
@saikumarrs
saikumarrs force-pushed the feature/int-6576-rudder-transformer-version-metric-label-on-per-destination branch 3 times, most recently from 00617d5 to 8758e9a Compare June 26, 2026 12:02
saikumarrs added a commit that referenced this pull request Jun 26, 2026
…est_destination (#5318)

## What

The data-plane half of integration definition-versioning in the
transformer — carry the **integration major** on the destination and
dispatch on it, plus a dev-only destination that exercises it
end-to-end. No production destination grows a real per-major branch
here.

### INT-6495 — version on the `Destination` type + dispatch idiom
- `version?: number` on the `Destination` type (mirrors Go
`DestinationT.Version`). Optional because it can be undefined — `0` /
`undefined` / `1` all dispatch as v1 (`Number(undefined)` is `NaN`), so
existing destinations behave identically.
- `destinationVersion?: number` received on the proxy/dataDelivery
payload (`ProxyV0/V1Request` + zod schemas) — the proxy route carries no
destination object, so the major arrives as a sibling field.
- Dispatch idiom documented in `CONTRIBUTING.md` and the
`code-structure` Claude skill (in-file branch by default; sibling-module
escalation; never route majors through `getDestHandler`).

### INT-6492 — dev-only `test_destination` (v1 only)
- `src/v0/destinations/test_destination/` dispatches on
`Number(destination.version)` in `transform`/`processRouterDest` and on
`destinationVersion` in `networkHandler`; `major >= 2` throws
not-implemented (only v1 is built).
- Processor / router / dataDelivery integration fixtures (v1,
no-version, v2-rejection) + a co-located unit test.
- Router capability registered in `features.ts`. Clearly labelled
**"DEV-ONLY — NOT A REAL DESTINATION"**; uses the reserved `.invalid`
endpoint. Control-plane exposure is gated to dev only (other repos).

## Out of scope
- No real per-major branch for any production destination (rollout
milestone).
- `test_destination` v2 path — stubbed to throw; only v1 implemented.

## Testing
- `test_destination` unit 4/4 · component
(processor/router/dataDelivery) 7/7
- `webhook` smoke 23/23 · `misc` (getFeatures) 2/2 — no regression
- Full pre-commit suite (`test:ts` + `test:js` + lint) green.

## References
- Linear: [INT-6495](https://linear.app/rudderstack/issue/INT-6495)
(version on the `Destination` type + dispatch idiom) ·
[INT-6492](https://linear.app/rudderstack/issue/INT-6492) (dev-only
`test_destination`)
- Paired (data plane sender): rudderlabs/rudder-server#7125 — carries
`version` on `DestinationT`; sends `destination.version`
(transform/router) + top-level `destinationVersion` (proxy).
- Stacked follow-up: #5319 —
[INT-6576](https://linear.app/rudderstack/issue/INT-6576) `destVersion`
metric label.
Base automatically changed from feature/int-6495-rudder-transformer-version-on-destination-type-dispatch to develop June 26, 2026 12:33
@saikumarrs saikumarrs self-assigned this Jun 26, 2026
…rics

INT-6576 — emit the integration major (destination.version) as a low-cardinality
`destVersion` label on the dest_transform_input_events / dest_transform_output_events
histograms (processor + router), and register it in the prometheus labelset. The value is
read through getDestinationVersion, so a missing/0 major (workspace config without a version
stamped) normalizes to 1 — dashboards never see a bogus destVersion=0.

Stacked on INT-6495 (version on the Destination type + getDestinationVersion). Source:
data-plane LLD §5 (DP.12).

Scanned-by: gitleaks 8.30.0
@saikumarrs
saikumarrs force-pushed the feature/int-6576-rudder-transformer-version-metric-label-on-per-destination branch from 8758e9a to de80f07 Compare June 26, 2026 12:37
@sonarqubecloud

Copy link
Copy Markdown

@saikumarrs
saikumarrs merged commit e200671 into develop Jun 26, 2026
34 checks passed
@saikumarrs
saikumarrs deleted the feature/int-6576-rudder-transformer-version-metric-label-on-per-destination branch June 26, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants