Fixup telemetry schema discrepancies - #7417
Merged
Merged
Conversation
Contributor
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a066039489
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 99b4b20 | Docs | Datadog PR Page | Give us feedback! |
bwoebi
force-pushed
the
bob/telemetry-schema
branch
3 times, most recently
from
July 30, 2026 13:17
6118830 to
355fa81
Compare
Telemetry schema: validate the envelope at the request root, not under a `header` property. The
envelope is flat and no payload has ever had a `header` key, so the whole header went unvalidated
for every library. Gated on `application` being present so agent-metrics/agent-bsod and
apm-onboarding-event keep their own header shape.
Fix message-batch: every branch put `payload` outside `properties` (an ignored keyword) and applied
object schemas to an array, so nested events were never validated - i.e. most telemetry, since
tracers send it batched. Same for the v2 `request_type` enum. Both now shared via
v2/objects/{request_type,payload_dispatch}.json.
Accept null alongside the declared type for the optional leaf fields: the intake is omitempty and treats null and
absent alike.
Add schemas for sketches and app-endpoints, which had no branch at all (note app-endpoints' kebab-
case `is-first`, the key the intake decodes).
Align strictness with the intake: mark a bunch of fields as not optional.
This solves the APMAPI-1938 and APMAPI-1270 SchemaBugs, which were bugs in the schema, not actual backend schema violations.
Adding a bunch of new schema bugs due to not validated message-batch
bwoebi
force-pushed
the
bob/telemetry-schema
branch
from
July 30, 2026 16:58
355fa81 to
650457e
Compare
nccatoni
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Telemetry schema: validate the envelope at the request root, not under a
headerproperty. Theenvelope is flat and no payload has ever had a
headerkey, so the whole header went unvalidatedfor every library. Gated on
applicationbeing present so agent-metrics/agent-bsod andapm-onboarding-event keep their own header shape.
Fix message-batch: every branch put
payloadoutsideproperties(an ignored keyword) and appliedobject schemas to an array, so nested events were never validated - i.e. most telemetry, since
tracers send it batched. Same for the v2
request_typeenum. Both now shared viav2/objects/{request_type,payload_dispatch}.json.
Accept null alongside the declared type for the optional leaf fields: the intake is omitempty and treats null and
absent alike.
Add schemas for sketches and app-endpoints, which had no branch at all (note app-endpoints' kebab-
case
is-first, the key the intake decodes).Align strictness with the intake: mark a bunch of fields as not optional.
This solves the APMAPI-1938 and APMAPI-1270 SchemaBugs, which were bugs in the schema, not actual backend schema violations.
Adding a bunch of new schema bugs due to not validated message-batch.