Skip to content

Commit

Permalink
fix: fix metric name and add reset information. (#13129)
Browse files Browse the repository at this point in the history
  • Loading branch information
tryangul committed Jul 16, 2024
1 parent 0eec5de commit 0409ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class ReplicationWorkerHelper(
streamStatusCompletionTracker.startTracking(configuredAirbyteCatalog, supportRefreshes)

if (configuredAirbyteCatalog.streams.isEmpty()) {
metricClient.count(OssMetricsRegistry.DESTINATION_DESERIALIZATION_ERROR, 1, *metricAttrs.toTypedArray())
metricClient.count(OssMetricsRegistry.SYNC_WITH_EMPTY_CATALOG, 1, *metricAttrs.toTypedArray())
}
}

Expand Down Expand Up @@ -515,6 +515,7 @@ private fun toConnectionAttrs(ctx: ReplicationContext?): List<MetricAttribute> {
ctx.connectionId?.let { add(MetricAttribute(MetricTags.CONNECTION_ID, it.toString())) }
ctx.jobId?.let { add(MetricAttribute(MetricTags.JOB_ID, it.toString())) }
ctx.attempt?.let { add(MetricAttribute(MetricTags.ATTEMPT_NUMBER, it.toString())) }
add(MetricAttribute(MetricTags.IS_RESET, ctx.isReset.toString()))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class MetricTags {
public static final String GEOGRAPHY = "geography";
public static final String IMPLEMENTATION = "implementation";
public static final String IS_CUSTOM_CONNECTOR_SYNC = "is_custom_connector_sync";
public static final String IS_RESET = "is_reset";
public static final String JOB_ID = "job_id";
public static final String JOB_STATUS = "job_status";
public static final String KILLED = "killed";
Expand Down

0 comments on commit 0409ce1

Please sign in to comment.