You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(datadog_metrics sink): switch to v2 endpoint (#24842)
* chore(datadog_metrics sink): switch to Datadog Metrics V2 endpoint
* chore(regression): Add statsd_to_datadog_metrics performance test
Add regression test to validate datadog_metrics sink v2 endpoint
performance under realistic high-throughput DogStatsD load.
Test Configuration:
- Load: Default lading dogstatsd settings (realistic ~2KB messages)
- Throughput: 500 Mb/s → ~250k events/sec
- Batch: Default settings (100k max_events, 2s timeout)
- Validates batch splitting when payloads exceed v2 size limits
This test ensures v2 endpoint correctly handles batch splitting
with realistic high-cardinality DogStatsD metrics under load.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(datadog_metrics sink): apply per-endpoint batch size limit
Different series endpoints have different uncompressed payload limits (v2
is 12x smaller than v1). This ensures each batch fits in a single HTTP
request without splitting, reducing memory overhead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(datadog_metrics sink): fix test compilation errors in encoder and config
- Remove references to DatadogMetricsCompression and request_compression
from encoder.rs tests (those symbols don't exist in current codebase;
they belong to an unmerged compression-options branch)
- Fix batcher_user_max_bytes_is_preserved test to avoid struct update
syntax with private PhantomData fields in BatchConfig
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(datadog_metrics sink): warn on deprecated VECTOR_TEMP_USE_DD_METRICS_SERIES_V2_API env var
The old opt-in env var is now a no-op since v2 is the default. Emit a
one-time warning so existing users know they can safely remove it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* trigger build
* feat(datadog_metrics sink): use separate batch size limits for Series and Sketches
Series v2 has a 5 MiB uncompressed payload limit while Sketches allows 60 MiB.
Previously both used the same (Series-derived) cap, which over-fragmented
sketch-heavy workloads into many small requests.
To support per-partition batch configuration, `PartitionedBatcher` now passes
the partition key to the batch config factory closure (`Fn(&Key) -> C` instead
of `Fn() -> C`). The explicit `timeout: Duration` parameter replaces the
previous extraction via `settings().timeout()`. All existing callers are
updated mechanically.
The `datadog_metrics` sink uses the new capability to select the appropriate
byte size limit per endpoint partition, keeping Series at 5 MiB and Sketches
at 60 MiB.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(datadog_metrics sink): fix CI failures after partitioned batcher refactor
- Add `Batch = B` constraint to `with_timer` test constructor so the
compiler can infer `B` from the batch config type
- Replace `Box::new(move |_| ...)` with unboxed `move |_: &u8| ...` in
tests to avoid HRTB inference issues with `Fn(&Key) -> C`
- Run `make fmt` to fix formatting in several sink files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(datadog_metrics sink): add series_api_version config field, remove env var support
- Add `series_api_version` config option (`v1` | `v2`, default `v2`) to `DatadogMetricsConfig`
- Make `SeriesApiVersion` a proper `#[configurable_component]` enum with serde support
- Remove `VECTOR_TEMP_USE_DD_METRICS_SERIES_V1_API` and `VECTOR_TEMP_USE_DD_METRICS_SERIES_V2_API` env vars
- Remove `get_api_version_backwards_compatible()` and `DatadogMetricsEndpoint::series()` helpers
- Thread `series_api_version` through config, sink, partitioner, and request builder
- Add `v1_batch_config_uses_v1_size_limit` test; update existing tests to pass explicit version
Rationale: Replace the hidden, process-global env var mechanism with a standard config field so
users can control the series API version per-sink without a full Vector restart, and so the option
is properly documented alongside other sink settings.
* update docs
* mark v1 as deprecated
* fix(datadog_metrics sink): fix gauge interval assertion after normalization strips interval_ms
`into_absolute()` always sets `interval_ms: None`, so the encoded
interval for gauges is always 0. The test expectation of 10 was
dead code until v2 became the default endpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(datadog_metrics sink): validate both v1 and v2 series endpoints in e2e tests
- Add series_api_version matrix dimension ['v1', 'v2'] to test.yaml, expanding coverage from 3 to 6 environments
- Pass CONFIG_SERIES_API_VERSION through docker compose environment to the Vector container
- Parameterize series_api_version in vector.toml from the env var
- Refactor series::validate() to dispatch to v1 or v2 fetch function based on CONFIG_SERIES_API_VERSION
- Extract assertions into compare_intakes() helper (no new assertion logic)
- Replace blocking std::thread::sleep with async tokio::time::sleep in the test entry point
Rationale: Vector now supports configurable series_api_version (v1/v2) in the datadog_metrics sink. The e2e test previously hardcoded v1 for the vector pipeline. This change runs the same assertions against both API versions via the CI matrix, ensuring correctness is validated for each version independently without duplicating test logic.
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments