-
Notifications
You must be signed in to change notification settings - Fork 33
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
O11Y-1750: implement spanLinks #56
Conversation
Merge Requirements Met ✅Request Rosie to automerge this pull request by including @Workiva/release-management-p in a comment. General InformationTicket(s): Code Review(s): #56 Reviewers: changliu-wk, blakeroberts-wk Additional InformationWatchlist Notifications: None
Note: This is a shortened report. Click here to view Rosie's full evaluation. |
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
3a636f3
to
23e5f41
Compare
23e5f41
to
be14434
Compare
Public API ChangesRecommendation: @@ line 8: package:opentelemetry/src/sdk/trace/span.dart @@
class Span implements Span
- Span Span(String name, SpanContext _spanContext, SpanId _parentSpanId, List<SpanProcessor> _processors, TimeProvider _timeProvider, Resource _resource, InstrumentationLibrary _instrumentationLibrary, {SpanKind kind, List<Attribute> attributes, List<SpanLink> links, Context parentContext, SpanLimits spanlimits, Int64 startTime})
+ Span Span(String name, SpanContext _spanContext, SpanId _parentSpanId, List<SpanProcessor> _processors, TimeProvider _timeProvider, Resource _resource, InstrumentationLibrary _instrumentationLibrary, {SpanKind kind, List<Attribute> attributes, List<SpanLink> links, Context parentContext, SpanLimits limits, Int64 startTime})
// `spanlimits` was removed.
// Removing a parameter is a major change.
+ List<SpanLink> get links
// Adding a field is a minor change.
Showing results for 23550bc
Last edited UTC May 25 at 16:19:33 |
QA +1 Unit test cases passed, used Test App tested new update, didn't break anything. Span links seems no showing in NewRelic. |
New Relic has mentioned in the past that they do not support span links. I assume they just drop that data. |
sdk.SpanLimits spanlimits, | ||
sdk.SpanLimits limits, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we expose the type sdk.Span
, this is a breaking change. I think it makes sense to either make this constructor not visible from our public API, or use one of the annotations here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I just wanted this parameter have same naming convention with others, it won't break wo11y-dart, which just uses TracerProvider, and didn't think we exposed the type sdk.Span. But I think perhaps no customer use this type so far. Of course, if you think this is not a good change, we can keep it as it was.
- If we hide this constructor, is it also a breaking change?
- I will try to hide it as you suggested to see how it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any issue with the name change. But going forward we should hide the sdk.Span constructor from consumers (however we do that) so we can continue to make changes to the constructor's arguments post 1.0 release if needed.
One option we may be able to explore is making the constructor private then supplying a protected/internal static method that invokes the private constructor. This static method would be what a tracer invokes to construct a span.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option we may be able to explore is making the constructor private then supplying a protected/internal static method that invokes the private constructor. This static method would be what a tracer invokes to construct a span.
I think this is a right way to do it. I will try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to let constructor to be a private method. But since it is an implementation of the abstract class, it would be safe to be remove from exported sdk API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this PR in wo11y-dart, we need to wait until O11Y-1786 is done to remove sdk span from exporting. I created a ticket for this work O11Y-1825.
@changliu-wk This pull request has merge conflicts, please resolve. |
3934866
to
eb71c1f
Compare
eb71c1f
to
4473d90
Compare
@changliu-wk This pull request has merge conflicts, please resolve. |
lib/src/sdk/trace/span.dart
Outdated
@@ -168,6 +164,58 @@ class Span implements api.Span { | |||
throw UnimplementedError(); | |||
} | |||
|
|||
// This method just can be called once during construction. | |||
static List<api.SpanLink> _addLinks( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: perhaps a method name like _applyLinkLimits
is a more descriptive method name?
QA +1 |
@Workiva/release-management-p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 from RM
https://jira.atl.workiva.net/browse/O11Y-1750
This PR implements spanLinks.
There are three limits with spanLinks.
@Workiva/observability