Skip to content

Commit

Permalink
stable job name in row metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <[email protected]>
  • Loading branch information
pyalex committed Oct 7, 2020
1 parent e47903f commit 114571a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
import feast.proto.types.ValueProto.Value;
import feast.proto.types.ValueProto.Value.ValCase;
import java.time.Clock;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.values.KV;
Expand Down Expand Up @@ -192,11 +194,15 @@ public void processElement(
}
}

String[] split = c.getPipelineOptions().getJobName().split("-");
String jobNameWithoutTimestamp =
Arrays.stream(split).limit(split.length - 1).collect(Collectors.joining("-"));

String[] tags = {
STORE_TAG_KEY + ":" + getStoreName(),
FEATURE_SET_PROJECT_TAG_KEY + ":" + featureSetProject,
FEATURE_SET_NAME_TAG_KEY + ":" + featureSetName,
INGESTION_JOB_NAME_KEY + ":" + c.getPipelineOptions().getJobName(),
INGESTION_JOB_NAME_KEY + ":" + jobNameWithoutTimestamp,
METRICS_NAMESPACE_KEY + ":" + getMetricsNamespace(),
};

Expand Down

0 comments on commit 114571a

Please sign in to comment.