Add service name to the logs only on self-host
This commit is contained in:
parent
d77a4062c7
commit
2dcb1a67a1
|
@ -19,8 +19,14 @@ if (!env.DISABLE_PINO_LOGGER) {
|
|||
return { level: label.toUpperCase() }
|
||||
},
|
||||
bindings: () => {
|
||||
return {
|
||||
service: env.SERVICE_NAME,
|
||||
if (env.SELF_HOSTED) {
|
||||
// "service" is being injected in datadog using the pod names,
|
||||
// so we should leave it blank to allow the default behaviour if it's not running self-hosted
|
||||
return {
|
||||
service: env.SERVICE_NAME,
|
||||
}
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue