Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2

* test(opentelemetry-configuration): simplify management of environment variables [#6004](https://github.com/open-telemetry/opentelemetry-js/pull/6004) @cjihrig
* test(opentelemetry-configuration): preserve special process.env behavior [#6010](https://github.com/open-telemetry/opentelemetry-js/pull/6010) @cjihrig
* test(sdk-logs): ensure process.env is cleaned up between tests [#xxxx](https://github.com/open-telemetry/opentelemetry-js/pull/xxxx) @cjihrig
Comment thread
cjihrig marked this conversation as resolved.
Outdated

## 0.206.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ describe('LoggerProvider - node', () => {
describe('constructor', () => {
describe('logRecordLimits', () => {
describe('when attribute value length limit is defined via env', () => {
afterEach(function () {
delete process.env.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT;
});

it('should have attribute value length limit as default of Infinity', () => {
process.env.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'Infinity';
const loggerProvider = new LoggerProvider();
Expand All @@ -41,26 +45,27 @@ describe('LoggerProvider - node', () => {
logRecordLimits.attributeValueLengthLimit,
Infinity
);
delete process.env.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT;
});
});

describe('when attribute count limit is defined via env', () => {
afterEach(function () {
delete process.env.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT;
});

it('should have attribute count limits as defined in env', () => {
process.env.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = '35';
const loggerProvider = new LoggerProvider();
const logRecordLimits =
loggerProvider['_sharedState'].logRecordLimits;
assert.strictEqual(logRecordLimits.attributeCountLimit, 35);
delete process.env.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT;
});
it('should have attribute count limit as default of 128', () => {
process.env.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT = '128';
const loggerProvider = new LoggerProvider();
const logRecordLimits =
loggerProvider['_sharedState'].logRecordLimits;
assert.strictEqual(logRecordLimits.attributeCountLimit, 128);
delete process.env.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT;
});
});
});
Expand Down