Why does ActiveGate return a 401 Unauthorized error?

When you send OTLP requests to ActiveGate and receive a 401 error, this indicates that the request either did not contain an authentication token or contained an invalid token value.

Make sure your request contains the HTTP Authorization header with Api-Token [TOKEN-HERE] as the value. For example:

Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890

where dt0c01.abc123.abcdefjhij1234567890 is an example token value.

For details, see Dynatrace API - Tokens and authentication.

SpoilerIf you configure the token using the OTEL_EXPORTER_OTLP_HEADERS environment variable, make sure its value is percent-encoded.

2 Likes