-
-
Notifications
You must be signed in to change notification settings - Fork 475
Add "data" property to Span #1235
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ public final class SentryTransaction extends SentryBaseEvent implements ITransac | |
|
|
||
| /** A list of spans within this transaction. Can be empty. */ | ||
| private final @NotNull List<Span> spans = new CopyOnWriteArrayList<>(); | ||
|
|
||
| /** | ||
| * A hub this transaction is attached to. Marked as transient to be ignored during JSON | ||
| * serialization. | ||
|
|
@@ -204,6 +205,16 @@ public void setDescription(@Nullable String description) { | |
| return this.context; | ||
| } | ||
|
|
||
| @Override | ||
| public void setData(@NotNull String key, @NotNull Object value) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth adding setData if event has setExtra already?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made a comment there. I think adding stuff to transaction such as that field isn't the way to go since this isn't what the protocol has. It'll be confusing to have both Extra and Data. We have to remember that in reality Transaction is an Event, we just turned things around here to simplify (not sure it did at this point) things by not having all the error API/pipeline that worked for errors also work for Transctions.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It had to be added here because
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe that's the problem. Having transation inherit from Span.
Sentry and its SDKs: Transction is event with type=transaction. We decided to create a class for it and split some fields. Maybe we just don't inherit from Span?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can think about it but it will probably change the design quite a bit. RIght now, when you get the current span to create a child span, you don't need to worry if it's a transaction or if it's a span - you just get an ISpan that lets you create children.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should discuss this because we'll need to get to a design where spans can be created alone. Friday we can discuss this if not earlier. I'll see if @mitsuhiko can join us.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is part of our agenda for tomorrow
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #1233 (comment) |
||
| setExtra(key, value); | ||
| } | ||
|
|
||
| @Override | ||
| public @Nullable Object getData(@NotNull String key) { | ||
| return getExtra(key); | ||
| } | ||
|
|
||
| /** | ||
| * Sets transaction status. | ||
| * | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.