Skip to content

Add configuration option to allow injecting headers on all outgoing requests #3759

@lukeelmers

Description

@lukeelmers

We can use apm?._apmClient?.config({ headers: { Foo: 'Baz' } }); to inject headers in requests from the agent, however it doesn't apply these headers to the first two requests that are sent when bootstrapping:

  1. GET $apmServer/
  2. GET $apmServer/config/v1/agents?... if using central config

It would be great to have a configuration option that could be set before any requests are sent, thus giving us a guarantee that all outgoing requests will have these headers.

Our use case is running an app in an environment where outbound network traffic is carefully controlled, and we need to add some special headers to ensure APM requests are allowed through.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions