Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
temp logs added
Browse files Browse the repository at this point in the history
  • Loading branch information
TriptiTripathi1234 committed Sep 27, 2022
1 parent 4911350 commit 68065ea
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
import org.hypertrace.traceenricher.enrichedspan.constants.EnrichedSpanConstants;
import org.hypertrace.traceenricher.enrichedspan.constants.v1.CommonAttribute;
import org.hypertrace.viewgenerator.generators.ViewGeneratorState.TraceState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Pre-processing for View Generators, for data that are mostly needed by the the view generators
*/
public abstract class BaseViewGenerator<OUT extends GenericRecord>
implements JavaCodeBasedViewGenerator<StructuredTrace, OUT> {

private static final Logger LOG = LoggerFactory.getLogger(BaseViewGenerator.class);
private static final String VIEW_GENERATION_ARRIVAL_TIME = "view.generation.arrival.time";
private static final Timer viewGeneratorArrivalTimer =
PlatformMetricsRegistry.registerTimer(DataflowMetricUtils.ARRIVAL_LAG, new HashMap<>());
Expand All @@ -47,12 +50,14 @@ static double getMetricValue(Event event, String metricName, double defaultValue

static double getDurationMetricValue(Event event) {
MetricValue value = event.getMetrics().getMetricMap().get("Duration-micro");
LOG.info("TraceDuration-micro value is {}", value.getValue());
return value.getValue();
}

static double getDurationMetricValueTrace(StructuredTrace structuredTrace) {
MetricValue value =
structuredTrace.getEventList().get(0).getMetrics().getMetricMap().get("Duration-micro");
LOG.info("Duration-micro value is {}", value.getValue());
return value.getValue();
}

Expand Down

0 comments on commit 68065ea

Please sign in to comment.