From dd974a36731b8a6942bc7775c121e8a93af46c86 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Fri, 7 May 2021 15:24:15 +0100 Subject: [PATCH 1/6] feat: apply spec changes for `TraceParams` --- packages/opentelemetry-sdk-node/src/sdk.ts | 2 +- packages/opentelemetry-sdk-node/src/types.ts | 4 +- packages/opentelemetry-tracing/src/Span.ts | 8 +-- packages/opentelemetry-tracing/src/Tracer.ts | 12 ++--- packages/opentelemetry-tracing/src/types.ts | 18 +++---- packages/opentelemetry-tracing/src/utility.ts | 4 +- .../test/BasicTracerProvider.test.ts | 50 +++++++++---------- .../opentelemetry-tracing/test/Span.test.ts | 6 +-- 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/packages/opentelemetry-sdk-node/src/sdk.ts b/packages/opentelemetry-sdk-node/src/sdk.ts index 77914611536..2cca062fd87 100644 --- a/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/packages/opentelemetry-sdk-node/src/sdk.ts @@ -68,7 +68,7 @@ export class NodeSDK { tracerProviderConfig.sampler = configuration.sampler; } if (configuration.traceParams) { - tracerProviderConfig.traceParams = configuration.traceParams; + tracerProviderConfig.spanLimits = configuration.traceParams; } const spanProcessor = diff --git a/packages/opentelemetry-sdk-node/src/types.ts b/packages/opentelemetry-sdk-node/src/types.ts index a34c1b5140c..6d4c172eac2 100644 --- a/packages/opentelemetry-sdk-node/src/types.ts +++ b/packages/opentelemetry-sdk-node/src/types.ts @@ -22,7 +22,7 @@ import { Resource } from '@opentelemetry/resources'; import { SpanExporter, SpanProcessor, - TraceParams, + SpanLimits, } from '@opentelemetry/tracing'; export interface NodeSDKConfiguration { @@ -38,5 +38,5 @@ export interface NodeSDKConfiguration { sampler: Sampler; spanProcessor: SpanProcessor; traceExporter: SpanExporter; - traceParams: TraceParams; + traceParams: SpanLimits; } diff --git a/packages/opentelemetry-tracing/src/Span.ts b/packages/opentelemetry-tracing/src/Span.ts index bfaf77b20b9..fd93c2f8949 100644 --- a/packages/opentelemetry-tracing/src/Span.ts +++ b/packages/opentelemetry-tracing/src/Span.ts @@ -28,7 +28,7 @@ import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import { ReadableSpan } from './export/ReadableSpan'; import { Tracer } from './Tracer'; import { SpanProcessor } from './SpanProcessor'; -import { TraceParams } from './types'; +import { SpanLimits } from './types'; import { SpanAttributeValue, Context } from '@opentelemetry/api'; import { ExceptionEventName } from './enums'; @@ -55,7 +55,7 @@ export class Span implements api.Span, ReadableSpan { private _ended = false; private _duration: api.HrTime = [-1, -1]; private readonly _spanProcessor: SpanProcessor; - private readonly _traceParams: TraceParams; + private readonly _traceParams: SpanLimits; /** Constructs a new Span instance. */ constructor( @@ -76,7 +76,7 @@ export class Span implements api.Span, ReadableSpan { this.startTime = timeInputToHrTime(startTime); this.resource = parentTracer.resource; this.instrumentationLibrary = parentTracer.instrumentationLibrary; - this._traceParams = parentTracer.getActiveTraceParams(); + this._traceParams = parentTracer.getSpanLimits(); this._spanProcessor = parentTracer.getActiveSpanProcessor(); this._spanProcessor.onStart(this, context); } @@ -128,7 +128,7 @@ export class Span implements api.Span, ReadableSpan { startTime?: api.TimeInput ): this { if (this._isSpanEnded()) return this; - if (this.events.length >= this._traceParams.numberOfEventsPerSpan!) { + if (this.events.length >= this._traceParams.eventCountLimit!) { api.diag.warn('Dropping extra events.'); this.events.shift(); } diff --git a/packages/opentelemetry-tracing/src/Tracer.ts b/packages/opentelemetry-tracing/src/Tracer.ts index 3b58b1739db..ecb0d681398 100644 --- a/packages/opentelemetry-tracing/src/Tracer.ts +++ b/packages/opentelemetry-tracing/src/Tracer.ts @@ -24,7 +24,7 @@ import { import { Resource } from '@opentelemetry/resources'; import { BasicTracerProvider } from './BasicTracerProvider'; import { Span } from './Span'; -import { TraceParams, TracerConfig } from './types'; +import { SpanLimits, TracerConfig } from './types'; import { mergeConfig } from './utility'; /** @@ -32,7 +32,7 @@ import { mergeConfig } from './utility'; */ export class Tracer implements api.Tracer { private readonly _sampler: api.Sampler; - private readonly _traceParams: TraceParams; + private readonly _spanLimits: SpanLimits; private readonly _idGenerator: IdGenerator; readonly resource: Resource; readonly instrumentationLibrary: InstrumentationLibrary; @@ -47,7 +47,7 @@ export class Tracer implements api.Tracer { ) { const localConfig = mergeConfig(config); this._sampler = localConfig.sampler; - this._traceParams = localConfig.traceParams; + this._spanLimits = localConfig.spanLimits; this._idGenerator = config.idGenerator || new RandomIdGenerator(); this.resource = _tracerProvider.resource; this.instrumentationLibrary = instrumentationLibrary; @@ -124,9 +124,9 @@ export class Tracer implements api.Tracer { return span; } - /** Returns the active {@link TraceParams}. */ - getActiveTraceParams(): TraceParams { - return this._traceParams; + /** Returns the active {@link SpanLimits}. */ + getSpanLimits(): SpanLimits { + return this._spanLimits; } getActiveSpanProcessor() { diff --git a/packages/opentelemetry-tracing/src/types.ts b/packages/opentelemetry-tracing/src/types.ts index 31561c19154..72c7e6a30f4 100644 --- a/packages/opentelemetry-tracing/src/types.ts +++ b/packages/opentelemetry-tracing/src/types.ts @@ -29,8 +29,8 @@ export interface TracerConfig { */ sampler?: Sampler; - /** Trace Parameters */ - traceParams?: TraceParams; + /** Span Limits */ + spanLimits?: SpanLimits; /** Resource associated with trace telemetry */ resource?: Resource; @@ -56,13 +56,13 @@ export interface SDKRegistrationConfig { } /** Global configuration of trace service */ -export interface TraceParams { - /** numberOfAttributesPerSpan is number of attributes per span */ - numberOfAttributesPerSpan?: number; - /** numberOfLinksPerSpan is number of links per span */ - numberOfLinksPerSpan?: number; - /** numberOfEventsPerSpan is number of message events per span */ - numberOfEventsPerSpan?: number; +export interface SpanLimits { + /** attributeCountLimit is number of attributes per span */ + attributeCountLimit?: number; + /** linkCountLimit is number of links per span */ + linkCountLimit?: number; + /** eventCountLimit is number of message events per span */ + eventCountLimit?: number; } /** Interface configuration for a buffer. */ diff --git a/packages/opentelemetry-tracing/src/utility.ts b/packages/opentelemetry-tracing/src/utility.ts index 615d4d57f37..65431a36858 100644 --- a/packages/opentelemetry-tracing/src/utility.ts +++ b/packages/opentelemetry-tracing/src/utility.ts @@ -33,10 +33,10 @@ export function mergeConfig(userConfig: TracerConfig) { userConfig ); - target.traceParams = Object.assign( + target.spanLimits = Object.assign( {}, DEFAULT_CONFIG.traceParams, - userConfig.traceParams || {} + userConfig.spanLimits || {} ); return target; diff --git a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts index 04c30a38a24..a05340be5b4 100644 --- a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts +++ b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts @@ -70,49 +70,49 @@ describe('BasicTracerProvider', () => { it('should construct an instance with default trace params', () => { const tracer = new BasicTracerProvider({}).getTracer('default'); - assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 128, - numberOfEventsPerSpan: 128, - numberOfLinksPerSpan: 128, + assert.deepStrictEqual(tracer.getSpanLimits(), { + attributeCountLimit: 128, + eventCountLimit: 128, + linkCountLimit: 128, }); }); - it('should construct an instance with customized numberOfAttributesPerSpan trace params', () => { + it('should construct an instance with customized attributeCountLimit trace params', () => { const tracer = new BasicTracerProvider({ - traceParams: { - numberOfAttributesPerSpan: 100, + spanLimits: { + attributeCountLimit: 100, }, }).getTracer('default'); - assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 100, - numberOfEventsPerSpan: 128, - numberOfLinksPerSpan: 128, + assert.deepStrictEqual(tracer.getSpanLimits(), { + attributeCountLimit: 100, + eventCountLimit: 128, + linksCountLimit: 128, }); }); - it('should construct an instance with customized numberOfEventsPerSpan trace params', () => { + it('should construct an instance with customized eventCountLimit trace params', () => { const tracer = new BasicTracerProvider({ - traceParams: { - numberOfEventsPerSpan: 300, + spanLimits: { + eventCountLimit: 300, }, }).getTracer('default'); - assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 128, - numberOfEventsPerSpan: 300, - numberOfLinksPerSpan: 128, + assert.deepStrictEqual(tracer.getSpanLimits(), { + attributeCountLimit: 128, + eventCountLimit: 300, + linkCountLimit: 128, }); }); - it('should construct an instance with customized numberOfLinksPerSpan trace params', () => { + it('should construct an instance with customized linkCountLimit trace params', () => { const tracer = new BasicTracerProvider({ - traceParams: { - numberOfLinksPerSpan: 10, + spanLimits: { + linkCountLimit: 10, }, }).getTracer('default'); - assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 128, - numberOfEventsPerSpan: 128, - numberOfLinksPerSpan: 10, + assert.deepStrictEqual(tracer.getSpanLimits(), { + attributeCountLimit: 128, + eventCountLimit: 128, + linkCountLimit: 10, }); }); diff --git a/packages/opentelemetry-tracing/test/Span.test.ts b/packages/opentelemetry-tracing/test/Span.test.ts index 23dcacd639c..75631fa5c3a 100644 --- a/packages/opentelemetry-tracing/test/Span.test.ts +++ b/packages/opentelemetry-tracing/test/Span.test.ts @@ -37,9 +37,9 @@ const performanceTimeOrigin = hrTime(); describe('Span', () => { const tracer = new BasicTracerProvider({ - traceParams: { - numberOfAttributesPerSpan: 100, - numberOfEventsPerSpan: 100, + spanLimits: { + attributeCountLimit: 100, + eventCountLimit: 100, }, }).getTracer('default'); const name = 'span1'; From 42d6ea03d8bc288abe545b55a0f367d27a9a8305 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Fri, 7 May 2021 15:58:38 +0100 Subject: [PATCH 2/6] fix: missed `traceParams`-symbols throughout the code base --- packages/opentelemetry-tracing/src/Span.ts | 8 ++++---- packages/opentelemetry-tracing/src/config.ts | 8 ++++---- packages/opentelemetry-tracing/src/utility.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/opentelemetry-tracing/src/Span.ts b/packages/opentelemetry-tracing/src/Span.ts index fd93c2f8949..fba33bb0141 100644 --- a/packages/opentelemetry-tracing/src/Span.ts +++ b/packages/opentelemetry-tracing/src/Span.ts @@ -55,7 +55,7 @@ export class Span implements api.Span, ReadableSpan { private _ended = false; private _duration: api.HrTime = [-1, -1]; private readonly _spanProcessor: SpanProcessor; - private readonly _traceParams: SpanLimits; + private readonly _spanLimits: SpanLimits; /** Constructs a new Span instance. */ constructor( @@ -76,7 +76,7 @@ export class Span implements api.Span, ReadableSpan { this.startTime = timeInputToHrTime(startTime); this.resource = parentTracer.resource; this.instrumentationLibrary = parentTracer.instrumentationLibrary; - this._traceParams = parentTracer.getSpanLimits(); + this._spanLimits = parentTracer.getSpanLimits(); this._spanProcessor = parentTracer.getActiveSpanProcessor(); this._spanProcessor.onStart(this, context); } @@ -99,7 +99,7 @@ export class Span implements api.Span, ReadableSpan { if ( Object.keys(this.attributes).length >= - this._traceParams.numberOfAttributesPerSpan! && + this._spanLimits.attributeCountLimit! && !Object.prototype.hasOwnProperty.call(this.attributes, key) ) { return this; @@ -128,7 +128,7 @@ export class Span implements api.Span, ReadableSpan { startTime?: api.TimeInput ): this { if (this._isSpanEnded()) return this; - if (this.events.length >= this._traceParams.eventCountLimit!) { + if (this.events.length >= this._spanLimits.eventCountLimit!) { api.diag.warn('Dropping extra events.'); this.events.shift(); } diff --git a/packages/opentelemetry-tracing/src/config.ts b/packages/opentelemetry-tracing/src/config.ts index 4e770eb5fae..1f97b91cf62 100644 --- a/packages/opentelemetry-tracing/src/config.ts +++ b/packages/opentelemetry-tracing/src/config.ts @@ -36,10 +36,10 @@ const FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn; */ export const DEFAULT_CONFIG = { sampler: buildSamplerFromEnv(env), - traceParams: { - numberOfAttributesPerSpan: getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - numberOfLinksPerSpan: getEnv().OTEL_SPAN_LINK_COUNT_LIMIT, - numberOfEventsPerSpan: getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT, + spanLimits: { + attributeCountLimit: getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, + linkCountLimit: getEnv().OTEL_SPAN_LINK_COUNT_LIMIT, + eventCountLimit: getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT, }, }; diff --git a/packages/opentelemetry-tracing/src/utility.ts b/packages/opentelemetry-tracing/src/utility.ts index 65431a36858..88ac69701cd 100644 --- a/packages/opentelemetry-tracing/src/utility.ts +++ b/packages/opentelemetry-tracing/src/utility.ts @@ -35,7 +35,7 @@ export function mergeConfig(userConfig: TracerConfig) { target.spanLimits = Object.assign( {}, - DEFAULT_CONFIG.traceParams, + DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {} ); From c7b5cc26921b4cb24ca44aad81ae0f11998a8d46 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Fri, 7 May 2021 17:05:33 +0100 Subject: [PATCH 3/6] test: rename trace params to span limits and fixed typo --- .../test/BasicTracerProvider.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts index a05340be5b4..2a666b3c3b4 100644 --- a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts +++ b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts @@ -68,7 +68,7 @@ describe('BasicTracerProvider', () => { assert.ok(provider instanceof BasicTracerProvider); }); - it('should construct an instance with default trace params', () => { + it('should construct an instance with default span limits', () => { const tracer = new BasicTracerProvider({}).getTracer('default'); assert.deepStrictEqual(tracer.getSpanLimits(), { attributeCountLimit: 128, @@ -77,7 +77,7 @@ describe('BasicTracerProvider', () => { }); }); - it('should construct an instance with customized attributeCountLimit trace params', () => { + it('should construct an instance with customized attributeCountLimit span limits', () => { const tracer = new BasicTracerProvider({ spanLimits: { attributeCountLimit: 100, @@ -86,11 +86,11 @@ describe('BasicTracerProvider', () => { assert.deepStrictEqual(tracer.getSpanLimits(), { attributeCountLimit: 100, eventCountLimit: 128, - linksCountLimit: 128, + linkCountLimit: 128, }); }); - it('should construct an instance with customized eventCountLimit trace params', () => { + it('should construct an instance with customized eventCountLimit span limits', () => { const tracer = new BasicTracerProvider({ spanLimits: { eventCountLimit: 300, @@ -103,7 +103,7 @@ describe('BasicTracerProvider', () => { }); }); - it('should construct an instance with customized linkCountLimit trace params', () => { + it('should construct an instance with customized linkCountLimit span limits', () => { const tracer = new BasicTracerProvider({ spanLimits: { linkCountLimit: 10, From e919ec4ee2dccb407248d2ba9a3dd029d273b427 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Mon, 10 May 2021 16:34:24 +0100 Subject: [PATCH 4/6] fix: renamed missed `traceParams` to `spanLimits` --- packages/opentelemetry-sdk-node/README.md | 30 ++++++++++---------- packages/opentelemetry-sdk-node/src/sdk.ts | 4 +-- packages/opentelemetry-sdk-node/src/types.ts | 2 +- packages/opentelemetry-tracing/src/config.ts | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/opentelemetry-sdk-node/README.md b/packages/opentelemetry-sdk-node/README.md index 156352b11bb..5a83c0463ea 100644 --- a/packages/opentelemetry-sdk-node/README.md +++ b/packages/opentelemetry-sdk-node/README.md @@ -2,7 +2,7 @@ [![NPM Published Version][npm-img]][npm-url] [![dependencies][dependencies-image]][dependencies-url] -[![devDependencies][devDependencies-image]][devDependencies-url] +[![devDependencies][devdependencies-image]][devdependencies-url] [![Apache License][license-image]][license-image] This package provides the full OpenTelemetry SDK for Node.js including tracing and metrics. @@ -40,10 +40,12 @@ This example uses Jaeger and Prometheus, but exporters exist for [other tracing const opentelemetry = require("@opentelemetry/sdk-node"); const { JaegerExporter } = require("@opentelemetry/exporter-jaeger"); const { PrometheusExporter } = require("@opentelemetry/exporter-prometheus"); -const { getNodeAutoInstrumentations } = require("@opentelemetry/auto-instrumentations-node"); +const { + getNodeAutoInstrumentations, +} = require("@opentelemetry/auto-instrumentations-node"); const jaegerExporter = new JaegerExporter({ - serviceName: 'my-service', + serviceName: "my-service", }); const prometheusExporter = new PrometheusExporter({ startServer: true }); @@ -59,22 +61,21 @@ const sdk = new opentelemetry.NodeSDK({ // You can optionally detect resources asynchronously from the environment. // Detected resources are merged with the resources provided in the SDK configuration. -sdk - .start() - .then(() => { - // Resources have been detected and SDK is started - }) +sdk.start().then(() => { + // Resources have been detected and SDK is started +}); // You can also use the shutdown method to gracefully shut down the SDK before process shutdown // or on some operating system signal. const process = require("process"); process.on("SIGTERM", () => { - sdk.shutdown() + sdk + .shutdown() .then( () => console.log("SDK shut down successfully"), - (err) => console.log("Error shutting down SDK", err), + (err) => console.log("Error shutting down SDK", err) ) - .finally(() => process.exit(0)) + .finally(() => process.exit(0)); }); ``` @@ -126,7 +127,7 @@ Configure a custom sampler. By default all traces will be sampled. Configure a trace exporter. If an exporter OR span processor is not configured, the tracing SDK will not be initialized and registered. If an exporter is configured, it will be used with a [BatchSpanProcessor](../opentelemetry-tracing/src/export/BatchSpanProcessor.ts). -### traceParams +### spanLimits Configure tracing parameters. These are the same trace parameters used to [configure a tracer](../opentelemetry-tracing/src/types.ts#L71). @@ -145,9 +146,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-node [dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-node -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-node&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-node&type=dev +[devdependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-sdk-node&type=dev +[devdependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-sdk-node&type=dev [npm-url]: https://www.npmjs.com/package/@opentelemetry/sdk-node [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fsdk-node.svg - [other-tracing-backends]: /~https://github.com/open-telemetry/opentelemetry-js#trace-exporters diff --git a/packages/opentelemetry-sdk-node/src/sdk.ts b/packages/opentelemetry-sdk-node/src/sdk.ts index 2cca062fd87..4f8741d672e 100644 --- a/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/packages/opentelemetry-sdk-node/src/sdk.ts @@ -67,8 +67,8 @@ export class NodeSDK { if (configuration.sampler) { tracerProviderConfig.sampler = configuration.sampler; } - if (configuration.traceParams) { - tracerProviderConfig.spanLimits = configuration.traceParams; + if (configuration.spanLimits) { + tracerProviderConfig.spanLimits = configuration.spanLimits; } const spanProcessor = diff --git a/packages/opentelemetry-sdk-node/src/types.ts b/packages/opentelemetry-sdk-node/src/types.ts index 6d4c172eac2..27d12b88257 100644 --- a/packages/opentelemetry-sdk-node/src/types.ts +++ b/packages/opentelemetry-sdk-node/src/types.ts @@ -38,5 +38,5 @@ export interface NodeSDKConfiguration { sampler: Sampler; spanProcessor: SpanProcessor; traceExporter: SpanExporter; - traceParams: SpanLimits; + spanLimits: SpanLimits; } diff --git a/packages/opentelemetry-tracing/src/config.ts b/packages/opentelemetry-tracing/src/config.ts index 1f97b91cf62..501388ccae6 100644 --- a/packages/opentelemetry-tracing/src/config.ts +++ b/packages/opentelemetry-tracing/src/config.ts @@ -31,7 +31,7 @@ const FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn; /** * Default configuration. For fields with primitive values, any user-provided * value will override the corresponding default value. For fields with - * non-primitive values (like `traceParams`), the user-provided value will be + * non-primitive values (like `spanLimits`), the user-provided value will be * used to extend the default value. */ export const DEFAULT_CONFIG = { From c15f679c915234451655de64ab922b3612c21fd0 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Wed, 12 May 2021 17:21:09 +0100 Subject: [PATCH 5/6] style: fixing quotes styling in README.md --- packages/opentelemetry-sdk-node/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opentelemetry-sdk-node/README.md b/packages/opentelemetry-sdk-node/README.md index 5a83c0463ea..5ca72acb461 100644 --- a/packages/opentelemetry-sdk-node/README.md +++ b/packages/opentelemetry-sdk-node/README.md @@ -45,7 +45,7 @@ const { } = require("@opentelemetry/auto-instrumentations-node"); const jaegerExporter = new JaegerExporter({ - serviceName: "my-service", + serviceName: 'my-service', }); const prometheusExporter = new PrometheusExporter({ startServer: true }); From c7f464a2a600857cece42779f0cc533f58905f8d Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Thu, 13 May 2021 02:42:24 +0100 Subject: [PATCH 6/6] docs: updated README.md --- packages/opentelemetry-sdk-node/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/opentelemetry-sdk-node/README.md b/packages/opentelemetry-sdk-node/README.md index 5ca72acb461..81a3bacc4a2 100644 --- a/packages/opentelemetry-sdk-node/README.md +++ b/packages/opentelemetry-sdk-node/README.md @@ -34,6 +34,7 @@ $ npm install @opentelemetry/auto-instrumentations-node Before any other module in your application is loaded, you must initialize the SDK. If you fail to initialize the SDK or initialize it too late, no-op implementations will be provided to any library which acquires a tracer or meter from the API. + This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. ```javascript