Fork me on GitHub

i know this question is 10% Ions and 90% AWS, but maybe one of you experts can help me out. i'm trying to configure a CloudWatch metric (later to be used as an Alarm), which looks for my Ion's cast/alerts and cast/events. after setting up the metric, i have no results in my graph, even though i can find filtered matches in my log streams when i use the same filter pattern. 1. in CloudWatch, i find my datomic-<system-name> log group 2. i select the radio option and click the Create Metric button 3. i enter the Filter Pattern {$.Msg = "my-specific-cast-event"} (which works as a normal filter pattern when searching log streams) 4. i choose a Metric Namespace (i don't think it matters which one) 5. i click Create Filter, and the final result is an empty an empty graph

Joe Lane17:04:02

@joshkh Are you in a solo topology?



Joe Lane17:04:43


NOTE AWS will display all metrics in lowercase with the first character capitalized. As an example, the aforementioned :CodeDeployEvent will display as Codedeployevent in both the metrics and the logs. Additionally, CloudWatch Metrics do not have namespaces, and any namespace provided in the metric name will be ignored. 

Joe Lane17:04:08

Are you trying to cast a metric from your local environment? I'm not sure that cast/metric works locally, it may have to be deployed. It's been a while since I've worked with these.


hey no worries, and thanks for the input. the cast is coming from a deployed environment, and i can see them in my cloudwatch logs. i just can't seem to wrangle them in the CloudWatch Metrics (which i think are different from what Datomic calls Metrics)


wait.. wait. i think you're totally on to something. thanks Joe!


(i'm using cast/event, not cast/metric)

Joe Lane19:04:34

Yeah, you gotta use metric 🙂


when I submit a retract transaction with this form:

[:db/retract entity-id attribute]
I get the following error:
Error printing return value (IndexOutOfBoundsException) at clojure.lang.PersistentVector/arrayFor ( null
my code specifically looks like:
(d/transact conn [[:db/retract 17592186123123 :entity/attribute]])
and the relevant schema looks like:
{:db/ident              :entity/attribute
 :db/valueType          :db.type/tuple
 :db/tupleTypes         [:db.type/string :db.type/string]
 :db/cardinality        :db.cardinality/many}
I don't think the fact that the attribute is a tuple or cardinality many is relevant, I've tried retracting string valued attributes with cardinality one in the same way and gotten the same error. Looking at the documentation here: it seems like I should not have to specify a value for a retraction and if the value is not specified it will retract all the attributes that match the supplied entity id and attribute. Anyone have any thoughts?


i think that functionality was introduced only in the very latest release of Datomic (13 Feb 2020). are you on the latest version? (cloud)


ah that'll be it, we're on 0.9.5981


@joshkh thanks for the fast response!


no problem! it's definitely a feature i thought would have existed for ages. but alas, we have it now 🙂