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

Improve transaction instrumentation on ASP.NET Core #766

Merged
merged 5 commits into from
Jan 27, 2021

Conversation

Tyrrrz
Copy link
Contributor

@Tyrrrz Tyrrrz commented Jan 27, 2021

Closes #761
Closes #760

@kanadaj

Things needed:

  1. Bind the transaction in the middleware on creation
  2. A GetCurrentTransaction() on IHub or ISentryClient
  3. Possibly a StartSpan() helper method to avoid fiddling with the transaction
  4. Either make CaptureTransaction() internal, or change the parameter type to ITransaction for consistency with public APIs.
  1. is done in this PR
  2. Scope.GetSpan() was added a few PRs ago which should return the last active (not finished) span (or transaction) on the current scope
  3. this is not part of the spec, but I think Scope.GetSpan().StartChild() should be equivalent to that
  4. done in previous PR

@Tyrrrz Tyrrrz added Feature New feature or request Framework: ASP.NET Core labels Jan 27, 2021
@Tyrrrz Tyrrrz requested a review from bruno-garcia as a code owner January 27, 2021 17:43
@bruno-garcia bruno-garcia enabled auto-merge (squash) January 27, 2021 21:04
@bruno-garcia bruno-garcia merged commit aed8894 into main Jan 27, 2021
@bruno-garcia bruno-garcia deleted the fix-aspnetcore-transactions branch January 27, 2021 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants