Skip to content

Commit 8271e88

Browse files
committed
docs(serializer): trim endpoint filter list comments to match neighboring settings
1 parent 9df7cf0 commit 8271e88

3 files changed

Lines changed: 11 additions & 19 deletions

File tree

pkg/config/schema/yaml/core_schema.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8522,21 +8522,15 @@ properties:
85228522
type: string
85238523
type: array
85248524
comment: |-
8525-
Per-endpoint metric filter lists, keyed by the endpoint URL exactly as it is
8526-
configured under `dd_url` or `additional_endpoints`. Metrics named in an entry are
8527-
not sent to that endpoint, and every other endpoint keeps receiving them.
8525+
Keyed by the endpoint URL exactly as configured under `dd_url` or
8526+
`additional_endpoints`. Unlike metric_filterlist, which drops during sampling and
8527+
so affects every destination, this is applied per destination as its payload is
8528+
built.
85288529
8529-
This differs from `metric_filterlist`, which is applied while metrics are sampled
8530-
and therefore removes them from every destination. This setting is applied when the
8531-
payload for each destination is built, so it can single out one endpoint.
8532-
8533-
Names are matched exactly. metric_filterlist_match_prefix does not apply, because
8534-
Remote Config resets that setting whenever it pushes a metric filter list.
8535-
8536-
Requires use_v2_api.series, which is the default. On the v1 series API a single
8537-
payload is built and copied to every destination, so there is no point at which a
8538-
per-endpoint filter can be applied; the Agent logs a warning if both are set.
8539-
Sketches are unaffected and always honour these lists.
8530+
Names are matched exactly; metric_filterlist_match_prefix does not apply, because
8531+
Remote Config resets that setting whenever it pushes a filter list. Requires
8532+
use_v2_api.series (the default): the v1 path builds one payload for all
8533+
destinations, so nothing can be filtered per endpoint there.
85408534
tags:
85418535
- full-agent-only:true
85428536
metric_filterlist_match_prefix:

pkg/serializer/metrics.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ func (s *Serializer) buildPipelinesRng(kind metricsKind, rng prng) metrics.Pipel
238238
dest.ValidationBatchID = s.genUUID()
239239
}
240240

241-
// An endpoint with its own filter list only receives the metrics
242-
// that list does not name. Every other endpoint is unaffected.
241+
// Endpoints without a filter list receive every metric.
243242
var filter metrics.Filter = metrics.AllowAllFilter{}
244243
if endpointFilter, ok := endpointFilters[resolver.GetConfigName()]; ok {
245244
filter = endpointFilter

pkg/serializer/metrics_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,15 @@ func TestEndpointFilterListsIgnoredOnV1Series(t *testing.T) {
334334
compressor := metricscompressionimpl.NewComponent(metricscompressionimpl.Requires{Cfg: config}).Comp
335335
s := NewSerializer(f, nil, compressor, config, logger, "")
336336

337-
// The warning is emitted once and must not panic or alter the pipelines that
338-
// other payload kinds still build.
337+
// Emitted once; sketches must still honor the list.
339338
s.warnEndpointFilterListsIgnored()
340339
s.warnEndpointFilterListsIgnored()
341340

342341
pipelines := s.buildPipelines(metricsKindSketches)
343342
require.Len(t, pipelines, 1)
344343
for conf := range pipelines {
345344
assert.False(t, conf.Filter.Filter(filterableMetric("datadog.agent.running")),
346-
"sketches still honour the endpoint filter list")
345+
"sketches still honor the endpoint filter list")
347346
}
348347
}
349348

0 commit comments

Comments
 (0)