DataDog / kong-plugin-ddtrace

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

Add support for DD_SERVICE, DD_ENV, DD_VERSION environment variables #27

Closed cgilmour closed 5 months ago

cgilmour commented 6 months ago

Similar to #26, this adds a few more.

When testing against a set of kong versions, it didn't work with v2.8.0, because the "env" vault isn't enabled by default. I think it was a beta feature at the time. So there's an extra check in the schema for that specific case.

cgilmour commented 6 months ago

Tests were considered for this, but it'd be mainly validating that a core bit of kong functionality (kong.vaults.get()) operates in a specific way, and that level of testing already exists within kong. They also get a bit "heavyweight", with the part under-test being a tiny detail among a lot of other moving parts. example

dgoffredo commented 6 months ago

My understanding is that these changes are for the subset of core tags that can be configured via environment variables, which are now accessible in Kong via vault://env.

It's an interesting thought, though, what values component and span.kind should have, if any. component:kong might help with telemetry, but then we have Q1 work to add Instrumentation Telemetry to Kong anyway.

cgilmour commented 5 months ago

This ended up making a fair amount of noise in log files when looking up values that aren't set, so I'll merge this and follow up with another PR that doesn't produce that noise.