opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

feat(instrumentation-http): Introduce contextHook

Open s0 opened this issue 8 months ago • 3 comments
trafficstars

Which problem is this PR solving?

Allow for open telemetry Context to be customized with additional values.

Fixes #5537

Short description of the changes

Introduce a new option for the http instrumentation to allow users to add data to the open telemetry Context at the point it is created, with the information derived from the incoming request.

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] Introduced a new unit test: should keep make the context from contextHook available

Checklist:

  • [x] Followed the style guidelines of this project
  • [x] Unit tests have been added
  • [ ] Documentation has been updated

s0 avatar Mar 17 '25 22:03 s0