DataDog / kong-plugin-ddtrace

Datadog APM Plugin for Kong Gateway
Apache License 2.0
15 stars 7 forks source link

HTTP Response headers not visible in datadog traces #3

Closed Aman-porter closed 5 months ago

Aman-porter commented 1 year ago

We integrated kong v3.2.2 with ddtrace plugin and metrics are being collected successfully. But the HTTP response headers (that are populated by kong) containing the info like -

  1. Ratelimit-Limit
  2. Ratelimit-Remaining

etc... are not visible. Could you please help us here if we are missing something ?

dmehala commented 6 months ago

Hi @Aman-porter

We apologize for the delayed response.

By default, Datadog limits the collection and reporting of HTTP Headers to a minimal set of headers as span tags. There are many reasons, the most important one is to avoid the collection of sensitive data. However, we provide users with the flexibility to customize header collection.

I am pleased to share that I recently implemented this feature for Kong (refer to #28). In my testing, this enhancement enables the reporting of HTTP Headers as span tags. I was also able to successfully reportRatelimit-Limit and Ratelimit-Remaining as span tags. You can expect this functionality in the upcoming release of kong-plugin-ddtrace.

To configure this feature, use the following commands when it will be available:

--data 'config.header_tags[1].header=Ratelimit-Limit' --data 'config.header_tags[2].header=Ratelimit-Remaining'

Here's an example for reference: Screenshot 2024-01-19 at 17 51 39