1+ /*
2+ * Copyright The OpenTelemetry Authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
117'use strict' ;
218
319const { diag, DiagConsoleLogger, DiagLogLevel } = require ( '@opentelemetry/api' ) ;
@@ -6,14 +22,19 @@ const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
622const { NetInstrumentation } = require ( '@opentelemetry/instrumentation-net' ) ;
723const { DnsInstrumentation } = require ( '@opentelemetry/instrumentation-dns' ) ;
824const { registerInstrumentations } = require ( '@opentelemetry/instrumentation' ) ;
9- const { SimpleSpanProcessor, ConsoleSpanExporter } = require ( '@opentelemetry/sdk-trace-base' ) ;
25+ const {
26+ SimpleSpanProcessor,
27+ ConsoleSpanExporter,
28+ } = require ( '@opentelemetry/sdk-trace-base' ) ;
1029const { JaegerExporter } = require ( '@opentelemetry/exporter-jaeger' ) ;
1130
1231const provider = new NodeTracerProvider ( {
1332 spanProcessors : [
14- new SimpleSpanProcessor ( new JaegerExporter ( {
15- serviceName : 'http-client' ,
16- } ) ) ,
33+ new SimpleSpanProcessor (
34+ new JaegerExporter ( {
35+ serviceName : 'http-client' ,
36+ } )
37+ ) ,
1738 new SimpleSpanProcessor ( new ConsoleSpanExporter ( ) ) ,
1839 ] ,
1940} ) ;
@@ -39,14 +60,20 @@ require('dns');
3960const https = require ( 'https' ) ;
4061const http = require ( 'http' ) ;
4162
42- http . get ( 'http://opentelemetry.io/' , ( ) => { } ) . on ( 'error' , ( e ) => {
43- console . error ( e ) ;
44- } ) ;
63+ http
64+ . get ( 'http://opentelemetry.io/' , ( ) => { } )
65+ . on ( 'error' , e => {
66+ console . error ( e ) ;
67+ } ) ;
4568
46- https . get ( 'https://opentelemetry.io/' , ( ) => { } ) . on ( 'error' , ( e ) => {
47- console . error ( e ) ;
48- } ) ;
69+ https
70+ . get ( 'https://opentelemetry.io/' , ( ) => { } )
71+ . on ( 'error' , e => {
72+ console . error ( e ) ;
73+ } ) ;
4974
50- https . get ( 'https://opentelemetry.io/' , { ca : [ ] } , ( ) => { } ) . on ( 'error' , ( e ) => {
51- console . error ( e ) ;
52- } ) ;
75+ https
76+ . get ( 'https://opentelemetry.io/' , { ca : [ ] } , ( ) => { } )
77+ . on ( 'error' , e => {
78+ console . error ( e ) ;
79+ } ) ;
0 commit comments