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
fix(config): coerce scalar config leaves the way the Agent does
The Agent never reads a setting as the type its YAML holds: GetBool,
GetInt, GetFloat64, and GetString each cast the stored value through
spf13/cast. Permissiveness is therefore a property of a leaf's declared
type, not of the key, so `dogstatsd_port: "8125"` and a string-typed
leaf written as a YAML boolean are configurations the Agent accepts.
The generated Datadog source model took each leaf's JSON type
literally, so those spellings failed deserialization. That aborts the
strict startup gate, and at runtime it rejects the whole Agent snapshot,
holding every other key at its last-known-good value.
Port cast.To{Bool,Int64,Float64,String}E into cast_de and have codegen
attach one by leaf type, keeping the schema's type as the field type.
env_decode now shares those parsers, so one accept-set serves the file,
the environment, and the Agent stream. A value the cast cannot convert
stays a hard error rather than the Agent's silent zero value.
Every generated field is classified, and an unrecognized type fails the
build, so a schema change cannot quietly ship a leaf that rejects input
the Agent accepts. This subsumes the overlay's `input_shape` metadata,
whose one shape (a byte size written as an integer) is what a string
leaf now accepts by type, so it and string_de are removed.
Type-directed coercion cannot cover a setting whose values are a closed
set rather than a type, so model `use_v3_api.series.enabled` as a
`V3SeriesMode` enum. Its `FromStr` lists the spellings the Agent's
evaluator interprets, the translator parses once instead of every
consumer re-parsing a `String`, and an uninterpretable mode recovers to
disabled — what the Agent routes on — while still recording a
translation error for the strict gate.
0 commit comments