Do not send the DD-APPLICATION-KEY header when the appkey is not set (ie. set to an empty string) on the client.
Sending a GET request to the api/v1/validate endpoint with a valid DD-API-KEY and no DD-APPLICATION-KEY succeeds.
Sending a GET request to the api/v1/validate endpoint with a valid DD-API-KEY and DD-APPLICATION-KEY set to an empty string fails.
This PR allows the API key validation method to succeed even when only an API key is used (which is enough in some use cases where an app key is not needed to access relevant endpoints).
Use case: the datadog opentelemetry exporter, which uses this library to send metrics, and only requires an API key to do its operations.
Do not send the
DD-APPLICATION-KEY
header when the appkey is not set (ie. set to an empty string) on the client.Sending a
GET
request to theapi/v1/validate
endpoint with a validDD-API-KEY
and noDD-APPLICATION-KEY
succeeds. Sending a GET request to theapi/v1/validate
endpoint with a validDD-API-KEY
andDD-APPLICATION-KEY
set to an empty string fails.This PR allows the API key validation method to succeed even when only an API key is used (which is enough in some use cases where an app key is not needed to access relevant endpoints).
Use case: the datadog opentelemetry exporter, which uses this library to send metrics, and only requires an API key to do its operations.