Conversation
|
|
||
| @Override | ||
| public void enrichEvent(StructuredTrace trace, Event event) { | ||
| var apiBoundaryType = event.getEnrichedAttributes().getAttributeMap() |
| @Override | ||
| public void enrichEvent(StructuredTrace trace, Event event) { | ||
| var apiBoundaryType = event.getEnrichedAttributes().getAttributeMap() | ||
| .get(API_BOUNDARY_TYPE_ATTR_NAME).getValue(); |
There was a problem hiding this comment.
I think according to ApiBoundaryTypeAttributeEnricher, API_BOUNDARY_TYPE_ATTR_NAME key will not always be set.
| private static boolean isEligibleForSubtraction(Event childEvent) { | ||
| var apiBoundaryType = childEvent.getEnrichedAttributes().getAttributeMap() | ||
| .get(API_BOUNDARY_TYPE_ATTR_NAME); | ||
| return apiBoundaryType != null && apiBoundaryType.getValue().equals(EXIT_BOUNDARY_TYPE); |
There was a problem hiding this comment.
Is this the complete condition check?
| .filter(InternalServiceLatencyEnricher::isEligibleForSubtraction) | ||
| .map(InternalServiceLatencyEnricher::getEventDuration) | ||
| .reduce(0L, Long::sum); | ||
| event.getAttributes().getAttributeMap() |
There was a problem hiding this comment.
why not enrichedAttributes?
if this is used then maybe we can create a new method with checks like in this in parent.
| EnrichedSpanConstants.getValue(BoundaryTypeValue.BOUNDARY_TYPE_VALUE_ENTRY); | ||
|
|
||
| @Override | ||
| public void enrichEvent(StructuredTrace trace, Event event) { |
| List<ApiNode<Event>> apiNodeList = apiTraceGraph.getApiNodeList(); | ||
| for (ApiNode<Event> apiNode : apiNodeList) { | ||
| List<ApiNodeEventEdge> edges = apiTraceGraph.getOutboundEdgesForApiNode(apiNode); | ||
| int edgeDurationSum = 0; |
There was a problem hiding this comment.
Why? Will this sum ever exceed 2,147,483,647ms? That's around 25 days.
| var entryApiBoundaryEvent = entryApiBoundaryEventMaybe.get(); | ||
| var entryApiBoundaryEventDuration = getEventDuration(entryApiBoundaryEvent); | ||
| try { | ||
| entryApiBoundaryEvent.getAttributes().getAttributeMap() |
There was a problem hiding this comment.
should it be enrichedAttributes or this is fine?
There was a problem hiding this comment.
Should be here as we want to see these attributes on the UI. Enriched attributes are not shown.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## rzp_main #12 +/- ##
==============================================
- Coverage 79.60% 79.46% -0.15%
- Complexity 1306 1311 +5
==============================================
Files 117 118 +1
Lines 5223 5273 +50
Branches 474 482 +8
==============================================
+ Hits 4158 4190 +32
- Misses 853 865 +12
- Partials 212 218 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Spec: https://docs.google.com/document/d/1wCSS3BRRrbwmnJBDvPNaL3O8ENQgTkD8iLlUTdnlMYI/edit
Edit: Have taken a better approach: