File tree 4 files changed +1
-13
lines changed
4 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,8 @@ import {
6
6
Resource ,
7
7
ResourceDetectionConfigWithLogger ,
8
8
} from '@opentelemetry/resources' ;
9
- import debug from 'debug' ;
10
9
import { getContainerIDFormCGroup } from './utils' ;
11
10
12
- const dbg = debug ( 'otcfg' ) ;
13
-
14
11
class DockerDetector implements Detector {
15
12
// eslint-disable-next-line class-methods-use-this
16
13
public async detect ( _config : ResourceDetectionConfigWithLogger ) : Promise < Resource > {
@@ -21,11 +18,9 @@ class DockerDetector implements Detector {
21
18
[ CONTAINER_RESOURCE . ID ] : cid ,
22
19
} ;
23
20
24
- dbg ( 'DockerDetector:' , attrs ) ;
25
21
return new Resource ( attrs ) ;
26
22
}
27
23
28
- dbg ( 'DockerDetector: not a Docker' ) ;
29
24
return Resource . empty ( ) ;
30
25
}
31
26
Original file line number Diff line number Diff line change @@ -9,17 +9,13 @@ import {
9
9
ResourceDetectionConfigWithLogger ,
10
10
SERVICE_RESOURCE ,
11
11
} from '@opentelemetry/resources' ;
12
- import debug from 'debug' ;
13
12
import { getContainerIDFormCGroup } from './utils' ;
14
13
15
- const dbg = debug ( 'otcfg' ) ;
16
-
17
14
class K8sDetector implements Detector {
18
15
// eslint-disable-next-line class-methods-use-this
19
16
public async detect ( _config : ResourceDetectionConfigWithLogger ) : Promise < Resource > {
20
17
const matches = / ^ ( .* ) - ( [ a - f 0 - 9 ] + ) - ( [ a - z 0 - 9 ] { 5 } ) $ / u. exec ( process . env . HOSTNAME || '' ) ;
21
18
if ( ! matches ) {
22
- dbg ( 'K8sDetector: not a k8s' ) ;
23
19
return Resource . empty ( ) ;
24
20
}
25
21
@@ -41,7 +37,6 @@ class K8sDetector implements Detector {
41
37
} ;
42
38
43
39
const cleaned = K8sDetector . cleanUpAttributes ( attrs ) ;
44
- dbg ( 'K8sDetector:' , cleaned ) ;
45
40
return new Resource ( cleaned ) ;
46
41
}
47
42
Original file line number Diff line number Diff line change @@ -17,13 +17,11 @@ class PackageJsonDetector implements Detector {
17
17
[ SERVICE_RESOURCE . VERSION ] : `${ json . version } ` ,
18
18
} ;
19
19
20
- dbg ( 'PackageJsonDetector:' , attrs ) ;
21
20
return new Resource ( attrs ) ;
22
21
} catch ( e ) {
23
22
// Do nothing
24
23
}
25
24
26
- dbg ( 'PackageJsonDetector: package.json not found' ) ;
27
25
return Resource . empty ( ) ;
28
26
}
29
27
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class OpenTelemetryConfigurator {
69
69
70
70
this . traceProvider . register ( ) ;
71
71
72
- dbg ( this . nodeTracerConfig . resource ?. attributes ) ;
72
+ dbg ( this . traceProvider . resource ?. attributes ) ;
73
73
74
74
process . once ( 'SIGINT' , this . shutdownHandler ) ;
75
75
process . once ( 'SIGTERM' , this . shutdownHandler ) ;
You can’t perform that action at this time.
0 commit comments