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 {
4- diag, trace, DiagConsoleLogger, DiagLogLevel,
20+ diag,
21+ trace,
22+ DiagConsoleLogger,
23+ DiagLogLevel,
524} = require ( '@opentelemetry/api' ) ;
625const { NodeTracerProvider } = require ( '@opentelemetry/sdk-trace-node' ) ;
7- const { getNodeAutoInstrumentations } = require ( '@opentelemetry/auto-instrumentations-node' ) ;
26+ const {
27+ getNodeAutoInstrumentations,
28+ } = require ( '@opentelemetry/auto-instrumentations-node' ) ;
829const { CollectorTraceExporter } = require ( '@opentelemetry/exporter-collector' ) ;
930const { SimpleSpanProcessor } = require ( '@opentelemetry/sdk-trace-base' ) ;
1031const { registerInstrumentations } = require ( '@opentelemetry/instrumentation' ) ;
@@ -18,17 +39,15 @@ module.exports = () => {
1839 } ) ;
1940
2041 const provider = new NodeTracerProvider ( {
21- spanProcessors : [
22- new SimpleSpanProcessor ( exporter ) ,
23- ] ,
42+ spanProcessors : [ new SimpleSpanProcessor ( exporter ) ] ,
2443 } ) ;
2544 provider . register ( ) ;
2645
2746 registerInstrumentations ( {
2847 instrumentations : [
2948 getNodeAutoInstrumentations ( {
3049 '@opentelemetry/instrumentation-http' : {
31- applyCustomAttributesOnSpan : ( span ) => {
50+ applyCustomAttributesOnSpan : span => {
3251 span . setAttribute ( 'foo2' , 'bar2' ) ;
3352 } ,
3453 } ,
0 commit comments