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 opentelemetry = require ( '@opentelemetry/api' ) ;
@@ -7,27 +23,28 @@ diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.VERBOSE);
723
824const { registerInstrumentations } = require ( '@opentelemetry/instrumentation' ) ;
925const { NodeTracerProvider } = require ( '@opentelemetry/sdk-trace-node' ) ;
10- const { SimpleSpanProcessor, ConsoleSpanExporter } = require ( '@opentelemetry/sdk-trace-base' ) ;
26+ const {
27+ SimpleSpanProcessor,
28+ ConsoleSpanExporter,
29+ } = require ( '@opentelemetry/sdk-trace-base' ) ;
1130const { Resource } = require ( '@opentelemetry/resources' ) ;
1231const { ATTR_SERVICE_NAME } = require ( '@opentelemetry/semantic-conventions' ) ;
1332
14- const { MemcachedInstrumentation } = require ( '@opentelemetry/instrumentation-memcached' ) ;
33+ const {
34+ MemcachedInstrumentation,
35+ } = require ( '@opentelemetry/instrumentation-memcached' ) ;
1536
16- module . exports = ( serviceName ) => {
37+ module . exports = serviceName => {
1738 const exporter = new ConsoleSpanExporter ( ) ;
1839 const provider = new NodeTracerProvider ( {
1940 resource : new Resource ( {
2041 [ ATTR_SERVICE_NAME ] : serviceName ,
2142 } ) ,
22- spanProcessors : [
23- new SimpleSpanProcessor ( exporter ) ,
24- ] ,
43+ spanProcessors : [ new SimpleSpanProcessor ( exporter ) ] ,
2544 } ) ;
2645 registerInstrumentations ( {
2746 tracerProvider : provider ,
28- instrumentations : [
29- new MemcachedInstrumentation ( ) ,
30- ] ,
47+ instrumentations : [ new MemcachedInstrumentation ( ) ] ,
3148 } ) ;
3249
3350 // Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings
0 commit comments