Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow suppressing nested activities without dependency on OTel #4642

Closed
wants to merge 1 commit into from

Conversation

lmolkova
Copy link

@lmolkova lmolkova commented Jul 6, 2023

Demonstrates approach proposed in #4641

Changes

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

private readonly SuppressInstrumentationScope? previousScope;
private bool disposed;

internal SuppressInstrumentationScope(bool value = true)
{
this.previousScope = Slot.Get();
this.Depth = value ? -1 : 0;
this.Depth = (value || (this.previousScope == null && IsSuppressedWithActivityProperty())) ? -1 : 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need perf numbers like #1049

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to do it efficiently is hard, we might need some primitives from .NET team.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Jul 20, 2023
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 28, 2023
@lmolkova lmolkova mentioned this pull request Feb 13, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Issues and pull requests which have been flagged for closing due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants