Skip to content
Merged
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
Prev Previous commit
possibly fix logs integration test for 3.8
  • Loading branch information
Lms24 committed Dec 18, 2025
commit b70a54604512350b59c7cdb95beddb96c42c6a95
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ Sentry.init({

async function run(): Promise<void> {
// only log attribute
Sentry.logger.info('log_before_any_scope', { log_attr: 'log_attr_1' });
Sentry.logger.info('log_before_any_scope', { log_attr: 'log_attr_1' }, {});

Sentry.getGlobalScope().setAttribute('global_scope_attr', true);

// this attribute will not be sent for now
Sentry.getGlobalScope().setAttributes({ array_attr: [1, 2, 3] });

// global scope, log attribute
Sentry.logger.info('log_after_global_scope', { log_attr: 'log_attr_2' });
Sentry.logger.info('log_after_global_scope', { log_attr: 'log_attr_2' }, {});

Sentry.withIsolationScope(isolationScope => {
isolationScope.setAttribute('isolation_scope_1_attr', { value: 100, unit: 'millisecond' });

// global scope, isolation scope, log attribute
Sentry.logger.info('log_with_isolation_scope', { log_attr: 'log_attr_3' });
Sentry.logger.info('log_with_isolation_scope', { log_attr: 'log_attr_3' }, {});

Sentry.withScope(scope => {
scope.setAttribute('scope_attr', { value: 200, unit: 'millisecond' });

// global scope, isolation scope, current scope attribute, log attribute
Sentry.logger.info('log_with_scope', { log_attr: 'log_attr_4' });
Sentry.logger.info('log_with_scope', { log_attr: 'log_attr_4' }, {});
});

Sentry.withScope(scope2 => {
scope2.setAttribute('scope_2_attr', { value: 300, unit: 'millisecond' });

// global scope, isolation scope, current scope attribute, log attribute
Sentry.logger.info('log_with_scope_2', { log_attr: 'log_attr_5' });
Sentry.logger.info('log_with_scope_2', { log_attr: 'log_attr_5' }, {});
});
});

Expand Down
Loading