DataDog / kong-plugin-ddtrace

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

[Bug]: noisy warning logs when using yaml based config and no Env vars #55

Closed cuotos closed 2 months ago

cuotos commented 2 months ago

Kong Version

3.6.1

Plugin Version

0.2.0-1

On which environment your Kong instance is running?

Docker

Plugin Configuration

n/a

What happened?

We configure the ddtrace plugin via kong config. But the ddtrace plugin also tries to do an env var lookup for all the config regularly, which uses kongs build in get_from_vault method, this logs an error every time.

This is very noisy in the kong gateway log files

If the config is set via the deck config file, or directly on the plugin, no warning should be shown when the env vars are not configured

2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_AGENT_HOST} (could not get value from external vault (no value found)), context: ngx.timer
2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_TRACE_AGENT_PORT} (could not get value from external vault (no value found)), context: ngx.timer
2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_SERVICE} (could not get value from external vault (no value found)), context: ngx.timer
2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_ENV} (could not get value from external vault (no value found)), context: ngx.timer
2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_VERSION} (could not get value from external vault (no value found)), context: ngx.timer
2024/04/18 16:37:44 [warn] 1320#0: *1793 [kong] vault.lua:1255 could not retrieve value for reference {vault://env/DD_TRACE_AGENT_URL} (could not get value from external vault (no value found)), context: ngx.timer
dmehala commented 2 months ago

Duplicates of #53