From 9a22011b07c8446fbe816ba701747b99f708ea9b Mon Sep 17 00:00:00 2001 From: vmarchaud Date: Sun, 11 Apr 2021 10:24:59 +0200 Subject: [PATCH] chore(env): update default value for span's attributes/links/events count #1675 --- .../src/utils/environment.ts | 6 +++--- .../test/BasicTracerProvider.test.ts | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/opentelemetry-core/src/utils/environment.ts b/packages/opentelemetry-core/src/utils/environment.ts index e5e3ef0847a..e50318db146 100644 --- a/packages/opentelemetry-core/src/utils/environment.ts +++ b/packages/opentelemetry-core/src/utils/environment.ts @@ -99,9 +99,9 @@ export const DEFAULT_ENVIRONMENT: Required = { OTEL_PROPAGATORS: ['tracecontext', 'baggage'], OTEL_RESOURCE_ATTRIBUTES: '', OTEL_SAMPLING_PROBABILITY: 1, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: 1000, - OTEL_SPAN_EVENT_COUNT_LIMIT: 1000, - OTEL_SPAN_LINK_COUNT_LIMIT: 1000, + OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: 128, + OTEL_SPAN_EVENT_COUNT_LIMIT: 128, + OTEL_SPAN_LINK_COUNT_LIMIT: 128, }; /** diff --git a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts index 981d7edb49c..0f64753a24a 100644 --- a/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts +++ b/packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts @@ -71,9 +71,9 @@ describe('BasicTracerProvider', () => { it('should construct an instance with default trace params', () => { const tracer = new BasicTracerProvider({}).getTracer('default'); assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 1000, - numberOfEventsPerSpan: 1000, - numberOfLinksPerSpan: 1000, + numberOfAttributesPerSpan: 128, + numberOfEventsPerSpan: 128, + numberOfLinksPerSpan: 128, }); }); @@ -85,8 +85,8 @@ describe('BasicTracerProvider', () => { }).getTracer('default'); assert.deepStrictEqual(tracer.getActiveTraceParams(), { numberOfAttributesPerSpan: 100, - numberOfEventsPerSpan: 1000, - numberOfLinksPerSpan: 1000, + numberOfEventsPerSpan: 128, + numberOfLinksPerSpan: 128, }); }); @@ -97,9 +97,9 @@ describe('BasicTracerProvider', () => { }, }).getTracer('default'); assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 1000, + numberOfAttributesPerSpan: 128, numberOfEventsPerSpan: 300, - numberOfLinksPerSpan: 1000, + numberOfLinksPerSpan: 128, }); }); @@ -110,8 +110,8 @@ describe('BasicTracerProvider', () => { }, }).getTracer('default'); assert.deepStrictEqual(tracer.getActiveTraceParams(), { - numberOfAttributesPerSpan: 1000, - numberOfEventsPerSpan: 1000, + numberOfAttributesPerSpan: 128, + numberOfEventsPerSpan: 128, numberOfLinksPerSpan: 10, }); });