-
Notifications
You must be signed in to change notification settings - Fork 16
chore: Add logs #227
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
chore: Add logs #227
Conversation
Codecov Report
@@ Coverage Diff @@
## main #227 +/- ##
=========================================
Coverage 80.50% 80.50%
Complexity 1126 1126
=========================================
Files 101 101
Lines 4349 4349
Branches 400 400
=========================================
Hits 3501 3501
Misses 659 659
Partials 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
| // does not need to build the full traversal graph, just get the parents mapping | ||
| StructuredTraceGraph graph = buildGraph(trace); | ||
|
|
||
| if (null == graph.getTraceEntitiesGraph() || null == graph.getTraceEventsGraph()) { |
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.
This can happen from multiple places, and we have seen in other enrichers too. So, should we move this to the data-model class?
Basically, can we move the logging to buildGraph method of StructureTraceGraph?
And can we do two things?
- can we make the default arg constructor private?
public StructuredTraceGraph() {
}
- And change the
createGraphmethod as below?
public static StructuredTraceGraph createGraph(StructuredTrace trace) {
TraceEventsGraph traceEventsGraph = TraceEventsGraph.createGraph(trace);
TraceEntitiesGraph traceEntitiesGraph = TraceEntitiesGraph.createGraph(trace);
graph = new StructuredTraceGraph();
graph.traceEventsGraph = traceEventsGraph;
graph.traceEntitiesGraph = traceEntitiesGraph;
return graph;
}
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.
Moved the log, on the other suggestion should we first observe the log and then make changes?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
||
| private static void debugGraph( | ||
| String logPrefix, StructuredTraceGraph graph, StructuredTrace trace) { | ||
| if (null == graph.getTraceEntitiesGraph() || null == graph.getTraceEventsGraph()) { |
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.
lets add graph != null too?
| return cachedGraphThreadLocal.get(); | ||
| } | ||
|
|
||
| private static void debugGraph( |
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.
Note: we will remove this after debugging.
No description provided.