Skip to content

Enforce lower-kebab-case for resource http headers#363

Merged
bdibon merged 1 commit into
masterfrom
boris.dibon/enforce-lower-case-http-headers
Mar 4, 2026
Merged

Enforce lower-kebab-case for resource http headers#363
bdibon merged 1 commit into
masterfrom
boris.dibon/enforce-lower-case-http-headers

Conversation

@bdibon

@bdibon bdibon commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a propertyNames constraint to both request.headers and response.headers in the resource schema, ensuring all header keys follow lowercase kebab-case format (e.g. content-type, x-request-id).

Motivation

HTTP header names collected in RUM resource events should be normalized to lowercase kebab-case for consistency. This schema-level validation prevents ingestion of headers with mixed casing (e.g. Content-Type) or non-standard separators (e.g. x_request_id), ensuring uniform keys across all resource events.

Changes

  • schemas/rum/resource-schema.json: Added propertyNames.pattern set to ^[a-z][a-z0-9](-[a-z0-9]+)$ on the headers object in both resource.request and resource.response.

@bdibon
bdibon requested review from a team as code owners March 4, 2026 14:14

@barboraplasovska barboraplasovska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bcaudan bcaudan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bdibon
bdibon merged commit 5622f2a into master Mar 4, 2026
12 checks passed
@bdibon
bdibon deleted the boris.dibon/enforce-lower-case-http-headers branch March 4, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants