Sync swagger: flatten consumption trace filter to repeated span filters - #113
Sync swagger: flatten consumption trace filter to repeated span filters#113prateek wants to merge 6 commits into
Conversation
Sync the configv1 spec from monorepo PR #87961 (head 53fc82773fa, pre-merge; will be re-synced from master before this merges) and regenerate clients/models/CLI. The trace_filter field on ConsumptionConfig partition filter conditions now takes the span-level ConsumptionTraceFilter shape (span_filters; any-of semantics across filters, all criteria on a single span) instead of the trace search filter shape. The field is preview, gated by the enable-consumption-trace-api flag. Riders picked up from configv1 spec drift (monorepo master vs the v1.28.0 sync): - PARENT_SERVICE/PARENT_OPERATION/ROOT_SERVICE/ROOT_OPERATION group-by key types on trace metrics rules. - Removal of the deprecated sku_group threshold field (breaking; resource_group replaced it in v1.28.0). The other three specs (configunstable, statev1, stateunstable) had no drift. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Note in the changelog that the previous trace_filter shape was never operative (the field is gated by enable-consumption-trace-api, which no tenant has enabled), and that manifests using the new shape require this release or newer since older chronoctl versions reject them at decode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review loop — iteration 1 (9 lenses; this PR's findings and fixes). Fixed (
CI green (single "build" check is the repo's complete expected set). 🤖 Generated with Claude Code |
Two precision fixes to the trace_filter migration note: older clients do not drop the filter on read, their lenient unmarshal keeps the key and renders an empty trace_filter object (the span_filters payload is what gets lost); and the never-operative claim is scoped to customer tenants during the old shape's lifetime, since the flag will be enabled on rc-uat test tenants at gate G1.5 before this ships in a release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review loop — iteration 2. Fixed ( Iteration 3 incoming: PR #87961's final head changed the span_filters description from any-of to all-of semantics — a spec re-sync will pick up the new wording. 🤖 Generated with Claude Code |
Re-sync the configv1 spec from monorepo PR #87961's squashed head (86b49c4d68a), which flipped ConsumptionTraceFilter.span_filters combination semantics from OR to AND: a span must now satisfy every span filter in the list to match a condition, with alternatives expressed via an IN string filter or separate conditions. The diff is description-only (spec.json, regenerated model comment, and scaffold YAML comment). The CHANGELOG entry for the trace_filter shape change is updated to state the all-of contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review loop — iteration 3 (OR→AND contract-flip wave). Fixed ( 🤖 Generated with Claude Code |
|
Review loop — iteration 4. One finding here, fixed body-only: the PR description still carried the pre-flip OR wording ("satisfies all criteria of one span filter") — now matches the CHANGELOG's conjunctive sentence, and the swagger-source line reflects that PR #87961's current head 🤖 Generated with Claude Code |
|
Review loop — converged at iteration 6. All nine lenses clean (the single cosmetic finding — a duplicated sentence in the chronoctl PR body from an earlier edit — was fixed and verified in-round). Final state: monorepo #87970 @ 🤖 Generated with Claude Code |
Re-sync from monorepo PR #87961 at dfaa7b975, which expanded the ConsumptionSpanFilter tags description with a note that numeric matchers also compare numeric-looking string tag values and that alternatives need separate conditions. Description-only; no shape change, so only the spec, the regenerated model comment, and the scaffold YAML comment move. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-sync the configv1 public API swagger after the PR 1 restructure that flattened the consumption trace contract. The ConsumptionTraceFilter wrapper is deleted; the partition filter condition now carries a repeated trace_span_filters field of the new top-level ConsumptionSpanFilter message directly. Generated changes: - delete Configv1ConsumptionTraceFilter and its nested ConsumptionTraceFilterConsumptionSpanFilter model - add top-level Configv1ConsumptionSpanFilter (the 8 span fields: service, operation, parent_service, parent_operation, duration, error, tags, is_root_span) - PartitionFilterCondition.TraceFilter becomes TraceSpanFilters []*Configv1ConsumptionSpanFilter Semantics are unchanged: a span matches the condition only if it satisfies every span filter (conjunctive); express alternatives with an IN matcher or separate conditions. The field stays in preview behind the enable-consumption-trace-api flag. Sync basis: monorepo ca42bd7b (PR 1 #87961). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
951182f to
04823fc
Compare
Syncs the configv1 swagger spec and regenerates clients/models/CLI (
make update-swagger, wholesale regen committed as CI requires).What this brings
v1/config/ConsumptionConfignow carries a repeatedtrace_span_filtersfield directly — a list of the new top-levelConsumptionSpanFiltermessage (8 fields each:service,operation,parent_service,parent_operation,duration,error,tags,is_root_span). The old singulartrace_filterfield and itsConsumptionTraceFilterwrapper are gone. Matching happens at the span level: a span matches the condition only if it satisfies every span filter in the list (conjunctive); express alternatives with anINstring filter or with separate conditions. The field is preview, gated by theenable-consumption-trace-apifeature flag.PARENT_SERVICE,PARENT_OPERATION,ROOT_SERVICE,ROOT_OPERATIONgroup-by key types onv1/config/TraceMetricsRules.sku_groupremoval: the deprecatedsku_groupfield is removed fromv1/config/ConsumptionBudgetthresholds in favor ofresource_group(which shipped in v1.28.0). Flagged as breaking in the CHANGELOG for the release team's versioning call.Scope
The configv1 restructure only: delete
Configv1ConsumptionTraceFilterand its nested span-filter model, add top-levelConfigv1ConsumptionSpanFilter, and renamePartitionFilterCondition.TraceFiltertoTraceSpanFilters []*Configv1ConsumptionSpanFilter, plus the CHANGELOG reword. The wholesalemake update-swaggeralso regenerated unrelatedconfigunstablemaster drift (a newcommand-center-groupsentity,SyntheticTestadditions); that was reverted to keep this PR scoped to the trace filter —configunstable,statev1, andstateunstableare unchanged. Phase 2's pre-merge wholesale re-sync from master will pick that drift up in its own right.Source
Specs synced from monorepo PR #87961 (the consumption trace restructure) at
ca42bd7b. The worktree swagger source matches that branch tip — PR 3 commits touch no swagger, re-verified before this resync.🤖 Generated with Claude Code