Skip to content

Commit

Permalink
Add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Rithika committed Jul 24, 2023
1 parent ca7d116 commit e38d5fb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public MetricAggregationPolicy policyForMetricName( String name)
{
MetricAggregationRules rules = rulesLoader.getRules();
List<MetricAggregationRule.Result> results = rules.apply( name );
log.info("Print the aggregate name: " + name);
return getInstance( results, rules.getRevision() );
}

Expand All @@ -45,6 +46,7 @@ private MetricAggregationPolicy getInstance( List<MetricAggregationRule.Result>
List<MetricAggregate> aggregates = results.stream()
.map( r -> new MetricAggregate( r.getAggregateName(), r.getMethod(), r.isDropOriginal() ))
.collect( Collectors.toList() );
log.info("Get the list of aggregates from the metric aggregation policy: " + aggregates.size());
return new MetricAggregationPolicy( revision, aggregates );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public boolean isEmpty()
public List<MetricAggregationRule.Result> apply( String metricName )
{
List<MetricAggregationRule.Result> results = new ArrayList<>( );
log.info("Metric Aggregation rules - get the metric name: " + metricName);

for(MetricAggregationRule rule : rules)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private RejectionHandler<DataPoint> queueRejectionHandler( String rejectPolicy )
t.drop();
};
}
log.info("Metric rejected - input queue");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public void drain()
@Override
public void process( List<DataPoint> points )
{
log.info("Process the data points");
Runnable task = taskBuilder.task(points);
if( ex != null ) {
ex.submit(task);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ private void processSinglePoint( DataPoint t )
log.trace( "->" + t );
}
nsCounter.count( t.name );
log.info("Process single data point: " + t.name);

auditLog.accept( t );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AggregationMethod apply(String name)
{
return method;
}

log.info("Get the metric name for single metric: " + name);
Matcher m = pattern.matcher( name );
return m.find() ? method : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public AggregationMethod apply( String metricName )

for(StorageAggregationRule rule : rules)
{
log.info("apply the storage aggregation rule: " + metricName);
method = rule.apply( metricName );
if( method != null )
{
Expand Down

0 comments on commit e38d5fb

Please sign in to comment.