Skip to content

Commit

Permalink
Initialize flow metrics if pipeline metric.collect params is enabled. (
Browse files Browse the repository at this point in the history
  • Loading branch information
mashhurs authored Jan 9, 2025
1 parent 4554749 commit 47d04d0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ public final IRubyObject collectStats(final ThreadContext context) throws IOExce
@JRubyMethod(name = "initialize_flow_metrics")
public final IRubyObject initializeFlowMetrics(final ThreadContext context) {
if (metric.collector(context).isNil()) { return context.nil; }
if (!getSetting(context, "metric.collect").isTrue()) { return context.nil; }

final UptimeMetric uptimeMetric = initOrGetUptimeMetric(context, buildNamespace(), UPTIME_IN_MILLIS_KEY);
final Metric<Number> uptimeInPreciseMillis = uptimeMetric.withUnitsPrecise(MILLISECONDS);
Expand Down

0 comments on commit 47d04d0

Please sign in to comment.