Skip to content

fix(aggregate transform): set interval_ms on incremental counters#24686

Draft
thomasqueirozb wants to merge 2 commits intomasterfrom
fix-23762-aggregate-interval-ms
Draft

fix(aggregate transform): set interval_ms on incremental counters#24686
thomasqueirozb wants to merge 2 commits intomasterfrom
fix-23762-aggregate-interval-ms

Conversation

@thomasqueirozb
Copy link
Contributor

Summary

Fixes #23762 where counter metrics from the aggregate transform were sent to Datadog as counts instead of rates. The aggregate transform now sets interval_ms on incremental counter metrics to match the configured flush interval.

Vector configuration

sources:
  demo:
    type: demo_logs
    format: apache_common
    interval: 1.0

transforms:
  metrics:
    type: log_to_metric
    inputs: [demo]
    metrics:
      - type: counter
        field: message
        name: requests

  aggregate:
    type: aggregate
    inputs: [metrics]
    interval_ms: 30000

sinks:
  datadog:
    type: datadog_metrics
    inputs: [aggregate]
    default_api_key: "${DATADOG_API_KEY}"

How did you test this PR?

  • Added unit tests for setting interval_ms on counters
  • Added unit tests for NOT setting interval_ms on gauges
  • All 16 aggregate tests pass
  • All 19 Datadog encoder tests pass

Change Type

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

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

@github-actions github-actions bot added the domain: transforms Anything related to Vector's transform components label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: transforms Anything related to Vector's transform components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate counters being sent as counters in Datadog sink

1 participant