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() }
|
return { level: label.toUpperCase() }
|
||||||
},
|
},
|
||||||
bindings: () => {
|
bindings: () => {
|
||||||
return {
|
if (env.SELF_HOSTED) {
|
||||||
service: env.SERVICE_NAME,
|
// "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