We have updated our Terms of Service, Code of Conduct, and Addendum.

Creating multiple metrics events from one log event

Jordan Perks
Jordan Perks Posts: 11

I am trying to create multiple metrics events from a single log event. In my log event, I have six metrics and seven dimensions. I would like each metric to output to Prometheus as its own event with all seven dimensions. How can a achieve this?



  • Brandon McCombs
    Brandon McCombs Posts: 150 mod

    To keep them as separate events you'll probably need a separate Public Metrics function added to the pipeline for each of the 6 metrics. For each instance you'll configure the requisite metric and the 7 dimensions, even if the 7 dims are the same for each metric function. The original events should continue flowing to each Publish Metrics function so you can create the separate metric events. However for each Publish Metric function you can set them to Final because the metrics themselves don't need to continue flowing to subsequent Publish Metrics functions. Hopefully that configuration gets you to your goal!