Skip to content

Commit 3f7d0ef

Browse files
rhuiserRafaelAPB
authored andcommitted
Enabled configuration of OTEL service name via environment variable
When running multiple functional instances of the SATP Gateway (one gateway for network 1, one gateway for network 2) you need for each instance a unique OTEL service name to keep logging, traces and metrics separated. As per the documentation here: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration ...I have used the standard environment variable OTEL_SERVICE_NAME to allow for this. Signed-off-by: Robin Huiser <[email protected]>
1 parent e7fd3ed commit 3f7d0ef

File tree

1 file changed

+1
-1
lines changed
  • packages/cactus-plugin-satp-hermes/src/main/typescript/services/monitoring

1 file changed

+1
-1
lines changed

packages/cactus-plugin-satp-hermes/src/main/typescript/services/monitoring/monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class MonitorService {
147147
}
148148

149149
const resource = new Resource({
150-
"service.name": "Satp-Hermes-Gateway",
150+
"service.name": process.env.OTEL_SERVICE_NAME || "Satp-Hermes-Gateway",
151151
});
152152

153153
if (!this.sdk) {

0 commit comments

Comments
 (0)