diff --git a/guides/_subsections/create-an-automated-rule.md b/guides/_subsections/create-an-automated-rule.md index 00469d6..2091b53 100644 --- a/guides/_subsections/create-an-automated-rule.md +++ b/guides/_subsections/create-an-automated-rule.md @@ -82,6 +82,20 @@ Previously, if we wanted to enable always-on `Continuous` monitoring using **JDK } {% endhighlight %} + The following functions are also available in the Expression execution context: +
+{% highlight typescript %} +/** +* @param target the target context object +* @returns a list of JFR Event Type IDs +*/ +jfrEventTypeIds(target: Target): string[] +{% endhighlight %} +
+ See also: +

The alias, connectUrl, labels, annotations.platform, and annotations.cryostat properties are all guaranteed to be present on the target object. alias and connectUrl will be non-empty strings. The jvmId is a hash string computed by Cryostat after it successfully connects to a target JVM and is used to uniquely identify that JVM instance - it will be empty if Cryostat has not yet connected to that target (for example, if its SSL/TLS certificate is not trusted or if Cryostat is missing the required credentials) The labels and platform annotations may be empty — in OpenShift or Kubernetes, these are populated from the labels and annotations applied to the target’s pod, if any. The Cryostat annotations map will vary per platform, but on OpenShift or Kubernetes you can expect the HOST, PORT, NAMESPACE, and POD_NAME keys to be present and non-empty. Take care to use the `has` or `in` operators when dealing with the labels and annotations map structures where specific keys may not exist. @@ -105,6 +119,8 @@ has(target.annotations.cryostat.PORT) && 'io.kubernetes/annotation' in target.an !('io.kubernetes/annotation' in target.annotations.platform) target.alias.matches("^customer-login[0-9]\*$") + +jfrEventTypeIds(target).exists(x, x.startsWith("myOrg.prefix.")) {% endhighlight %}