Skip to content

Commit

Permalink
feat: added application name
Browse files Browse the repository at this point in the history
  • Loading branch information
MetinSeylan committed Mar 13, 2022
1 parent 6774782 commit f764dce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Metric/MetricService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export class MetricService {
delete attr['process.pid'];
delete attr['process.command_line'];

attr['application'] = this.sdkConfig.applicationName;

return attr;
}
}
2 changes: 2 additions & 0 deletions src/OpenTelemetryModuleConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ import { JaegerPropagator } from '@opentelemetry/propagator-jaeger';
import { B3InjectEncoding, B3Propagator } from '@opentelemetry/propagator-b3';

export interface OpenTelemetryModuleConfig extends Partial<NodeSDKConfiguration> {
applicationName?: string;
traceAutoInjectors?: Provider<Injector>[];
metricAutoObservers?: Provider<BaseMetric>[];
}

export const OpenTelemetryModuleDefaultConfig = {
applicationName: 'UNDEFINED',
traceAutoInjectors: [
ControllerInjector,
GuardInjector,
Expand Down

0 comments on commit f764dce

Please sign in to comment.