-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Performance API follow up #663
Comments
What should be the default value for
What does a "current span" mean? Last created transaction?
Do spans actually have names? From what I know, they don't.
What does that do? The docs don't seem to cover that.
Do you mean |
@bruno-garcia ping |
I don't know. And I rather it's not mutable unless it must be. I date to say folks might not have attempted to make it immutable on other SDKs yet. What needs to be mutable? Btw if it's mutable, it needs to be thread-safe. THat's not a concern on some other SDKs (single threaded like node, php and ruby). What does a "current span" mean? Last created transaction? I believe it's the last created span in the tree. Is the definition written somewhere? We need to get it defined in the docs so others can implement this. @HazAT or @marandaneto might chime in.
If we have name in Java then we should probably get rid of it. @maciejwalkowiak maybe knows.
Maciej and I came up with that in a way to bind an exception to the span which it was running under. I believe other SDKs don't have that at all. We need to document this. @maciejwalkowiak could you please document that in the Java docs? Basically we need to related the span and the exception we are about to rethrow for the error tracking integration to capture upstream.
|
Spans don't have a name but have
Current span is the span that has been started but has not been finished yet. If there is no current ongoing span, Regarding linking events with spans: To mark event as one that happened during the particular span, event trace context must be set to the same values as the span. This has to be tackled in two ways:
In Java it's done in SentryClient: https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/SentryClient.java#L438
This is where we needed a weak reference. Both Transaction and Span has a transient field: throwable, which is added to weak hashmap when transaction/span is finished https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/Span.java#L65 Then when an event is created from the caught exceptions, we look up this span/transaction and set it on the event: https://github.com/getsentry/sentry-java/blob/main/sentry-spring/src/main/java/io/sentry/spring/SentryExceptionResolver.java#L55 |
Notes from meeting
|
@bruno-garcia do we want to rename |
@bruno-garcia one more nitty question:
Also, in .NET |
@bruno-garcia in regards to sampling, Java has |
@bruno-garcia in .NET we have |
A callback is fine (we have BeforeSend). The interface plays well with IoC and ASP.NET Core so you can register your samples in the container but lets stay aligned here and we can add some interface straight to aspnetcore later if we decide to.
|
Regarding |
@maciejwalkowiak |
Closing this, as the only remaining issue is tracked in #738 |
I've tried to add some docs, and in the process a few things came up.
Docs PR: getsentry/sentry-docs#2790
Notes:
Sentry's SDKs use
startTransaction
but .NET hasCreateTransaction
Java requires only "name" and .NET requires "name" and "op".
Code snippets in Java set an Op right after creating it, should it be in the Start method instead?
Java has
Sentry.getSpan();
to get the current "span bound to the Hub". How do we do this in .NET?Is this in JavaScript? If not, how do we do it there?
// C#:
var innerSpan = span.StartChild("task");
// Java
Span innerSpan = span.startChild("task", item.getName());
How do I set the span name in C#? Only operation in the method signature.
In Java we set the exception to the transaction, which is kept in a WeakRef so we can corelate the error event to the transaction.
How do we do this in C#?
Java has:
How do we do this? Should we change Java to something else. I believe Go doesn't distinct between StartTran or StartSpan (thinking in the future with single span ingestion, does it matter?)
The text was updated successfully, but these errors were encountered: