DataDog / kong-plugin-ddtrace

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

configure plugin using DD_AGENT_HOST environment variables #26

Closed cgilmour closed 6 months ago

cgilmour commented 6 months ago

This is to resolve recent issues, and improve changes from a recent contribution in #20.

It provides a way for DD_AGENT_HOST and DD_TRACE_AGENT_URL to set the address the agent uses to communicate with the agent. This is helpful in containerized environments or when there's a provisioning layer used in the deployment of kong.

The reference format {vault://env/dd-agent-host} is transformed to mean DD_AGENT_HOST.

Local E2E testing has been performed on this to confirm the expected outcome. Eg: DD_AGENT_HOST=dd-agent DD_TRACE_AGENT_URL=http://datadog-agent:8126 kong start will send traffic to datadog-agent:8126 (url has priority over host).

Related issue #19

cgilmour commented 6 months ago

Thanks for spotting those things. I've updated it along with a couple of other minor changes