Upsert a metric in an environment

#1

How can I upsert a metric in an environment:

SimpleMetric.upsert(myMetric) does not work.

0 Likes

#2

var v = MetadataStore.tag()
v.upsertSeedObjs([SimpleMetric.make(myMetric)])

should work.

1 Like

#3

While this will work it is a really bad idea to upsert Metadata since it will be wiped out the next time the environment is provisioned. You should use apis like evalMetricsWithMetadata to prototype and then always create metrics via provisioning.

0 Likes

How to create a metric from console (without reprovisioning)