Skip to content

Commit 5c54442

Browse files
Be less verbose
1 parent 7235b05 commit 5c54442

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

lib/detector/dockerdetector.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import {
66
Resource,
77
ResourceDetectionConfigWithLogger,
88
} from '@opentelemetry/resources';
9-
import debug from 'debug';
109
import { getContainerIDFormCGroup } from './utils';
1110

12-
const dbg = debug('otcfg');
13-
1411
class DockerDetector implements Detector {
1512
// eslint-disable-next-line class-methods-use-this
1613
public async detect(_config: ResourceDetectionConfigWithLogger): Promise<Resource> {
@@ -21,11 +18,9 @@ class DockerDetector implements Detector {
2118
[CONTAINER_RESOURCE.ID]: cid,
2219
};
2320

24-
dbg('DockerDetector:', attrs);
2521
return new Resource(attrs);
2622
}
2723

28-
dbg('DockerDetector: not a Docker');
2924
return Resource.empty();
3025
}
3126

lib/detector/k8sdetector.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ import {
99
ResourceDetectionConfigWithLogger,
1010
SERVICE_RESOURCE,
1111
} from '@opentelemetry/resources';
12-
import debug from 'debug';
1312
import { getContainerIDFormCGroup } from './utils';
1413

15-
const dbg = debug('otcfg');
16-
1714
class K8sDetector implements Detector {
1815
// eslint-disable-next-line class-methods-use-this
1916
public async detect(_config: ResourceDetectionConfigWithLogger): Promise<Resource> {
2017
const matches = /^(.*)-([a-f0-9]+)-([a-z0-9]{5})$/u.exec(process.env.HOSTNAME || '');
2118
if (!matches) {
22-
dbg('K8sDetector: not a k8s');
2319
return Resource.empty();
2420
}
2521

@@ -41,7 +37,6 @@ class K8sDetector implements Detector {
4137
};
4238

4339
const cleaned = K8sDetector.cleanUpAttributes(attrs);
44-
dbg('K8sDetector:', cleaned);
4540
return new Resource(cleaned);
4641
}
4742

lib/detector/packagejsondetector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ class PackageJsonDetector implements Detector {
1717
[SERVICE_RESOURCE.VERSION]: `${json.version}`,
1818
};
1919

20-
dbg('PackageJsonDetector:', attrs);
2120
return new Resource(attrs);
2221
} catch (e) {
2322
// Do nothing
2423
}
2524

26-
dbg('PackageJsonDetector: package.json not found');
2725
return Resource.empty();
2826
}
2927

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class OpenTelemetryConfigurator {
6969

7070
this.traceProvider.register();
7171

72-
dbg(this.nodeTracerConfig.resource?.attributes);
72+
dbg(this.traceProvider.resource?.attributes);
7373

7474
process.once('SIGINT', this.shutdownHandler);
7575
process.once('SIGTERM', this.shutdownHandler);

0 commit comments

Comments
 (0)