Skip to content

Commit 7f81341

Browse files
sarthak77Sarthak Singhalkotharironak
authored
Addition of span count attribute (#282)
* added span count attribute * resolved PR comment * Update hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/SpanEventViewGenerator.java Co-authored-by: kotharironak <[email protected]> * Update hypertrace-view-generator/hypertrace-view-generator-api/src/main/avro/SpanEventView.avdl Co-authored-by: kotharironak <[email protected]> * Update SpanEventView.avdl * Update SpanEventViewGenerator.java Co-authored-by: Sarthak Singhal <[email protected]> Co-authored-by: kotharironak <[email protected]>
1 parent 30f0a7b commit 7f81341

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

hypertrace-view-generator/hypertrace-view-generator-api/src/main/avro/SpanEventView.avdl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,7 @@ protocol SpanEventViewProtocol {
103103
map<string> api_callee_name_count = {};
104104

105105
int api_trace_error_span_count = 0;
106+
107+
int spans = 0;
106108
}
107109
}

hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/SpanEventViewGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ private SpanEventView.Builder generateViewBuilder(
226226
builder.setErrorCount((int) errorMetric.getValue().doubleValue());
227227
}
228228

229+
builder.setSpans(1);
230+
229231
MetricValue exceptionMetric = event.getMetrics().getMetricMap().get(EXCEPTION_COUNT_CONSTANT);
230232
if (exceptionMetric != null && exceptionMetric.getValue() > 0.0d) {
231233
builder.setExceptionCount((int) exceptionMetric.getValue().doubleValue());

0 commit comments

Comments
 (0)