Skip to content

feat(opentelemetry-node): capture HTTP headers, configurable by envvars#1349

Merged
trentm merged 11 commits intomainfrom
trentm-capture-headers
Feb 25, 2026
Merged

feat(opentelemetry-node): capture HTTP headers, configurable by envvars#1349
trentm merged 11 commits intomainfrom
trentm-capture-headers

Conversation

@trentm
Copy link
Member

@trentm trentm commented Feb 6, 2026

This adds support for the following envvars to configure HTTP header capture
by the 'http' and 'undici' instrumentations:
ELASTIC_OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_REQUEST_HEADERS
ELASTIC_OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_RESPONSE_HEADERS
ELASTIC_OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS
ELASTIC_OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_RESPONSE_HEADERS

OTel Java and Python already have envvars of the same name (without the
'ELASTIC_' prefix, of course).

Closes: #1203

Checklist

This adds support for the following envvars to configure HTTP header capture
by the 'http' and 'undici' instrumentations:
    ELASTIC_OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_REQUEST_HEADERS
    ELASTIC_OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_RESPONSE_HEADERS
    ELASTIC_OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS
    ELASTIC_OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_RESPONSE_HEADERS

OTel Java and Python already have envvars of the same name (without the
'ELASTIC_' prefix, of course).

Closes: #1203
@trentm trentm self-assigned this Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Vale Linting Results

Summary: 1 suggestion found

💡 Suggestions (1)
File Line Rule Message
docs/reference/edot-node/configuration.md 220 Elastic.Semicolons Use semicolons judiciously.

The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

…y added to Node.js's fetch/Response impl in v22.3.0
@trentm trentm marked this pull request as ready for review February 10, 2026 01:19
@trentm trentm requested review from a team as code owners February 10, 2026 01:19
@trentm trentm requested a review from david-luna February 19, 2026 23:07
@trentm trentm merged commit b146eb3 into main Feb 25, 2026
14 checks passed
@trentm trentm deleted the trentm-capture-headers branch February 25, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants