Skip to content

Commit

Permalink
fix(core): too many metrics are created with trigger_id that overflow…
Browse files Browse the repository at this point in the history
… metrics server
  • Loading branch information
tchiotludo committed May 4, 2022
1 parent 1bdc921 commit ed86d0d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/src/main/java/io/kestra/core/metrics/MetricRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class MetricRegistry {
public final static String TAG_TASK_TYPE = "task_type";
public final static String TAG_FLOW_ID = "flow_id";
public final static String TAG_NAMESPACE_ID = "namespace_id";
public final static String TAG_TRIGGER_ID = "trigger_id";
public final static String TAG_STATE = "state";
public final static String TAG_ATTEMPT_COUNT = "attempt_count";

Expand Down Expand Up @@ -193,7 +192,6 @@ public String[] tags(TriggerContext triggerContext) {
return new String[]{
TAG_FLOW_ID, triggerContext.getFlowId(),
TAG_NAMESPACE_ID, triggerContext.getNamespace(),
TAG_TRIGGER_ID, triggerContext.getTriggerId(),
};
}

Expand All @@ -205,11 +203,8 @@ public String[] tags(TriggerContext triggerContext) {
*/
public String[] tags(SchedulerExecutionWithTrigger schedulerExecutionWithTrigger, String... tags) {
return ArrayUtils.addAll(
ArrayUtils.addAll(
this.tags(schedulerExecutionWithTrigger.getExecution()),
tags
),
TAG_TRIGGER_ID, schedulerExecutionWithTrigger.getTriggerContext().getTriggerId()
this.tags(schedulerExecutionWithTrigger.getExecution()),
tags
);
}

Expand Down

0 comments on commit ed86d0d

Please sign in to comment.