Skip to content

Commit

Permalink
refactor: Initialize telemetry with correct service name in Telemetry…
Browse files Browse the repository at this point in the history
… and InfrastructureStatus
  • Loading branch information
simlarsen committed Aug 2, 2024
1 parent e60b06d commit 3f8a529
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions App/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ const APP_NAME: string = "app";

const init: PromiseVoidFunction = async (): Promise<void> => {
try {

// Initialize telemetry
Telemetry.init({
serviceName: APP_NAME,
});

const statusCheck: PromiseVoidFunction = async (): Promise<void> => {
// Check the status of infrastructure components
return await InfrastructureStatus.checkStatus({
Expand Down
3 changes: 0 additions & 3 deletions CommonServer/Utils/Telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default class Telemetry {
}

public static init(data: { serviceName: string }): opentelemetry.NodeSDK {

if (!this.sdk) {
const headers: Dictionary<string> = this.getHeaders();

Expand Down Expand Up @@ -150,8 +149,6 @@ export default class Telemetry {

logs.setGlobalLoggerProvider(loggerProvider);



const nodeSdkConfiguration: Partial<opentelemetry.NodeSDKConfiguration> =
{
idGenerator: new AWSXRayIdGenerator(),
Expand Down

0 comments on commit 3f8a529

Please sign in to comment.