1

Have two spring cloud stream applications. One is producer to produce message to kafka. The other is processor to process message from kafka. Now we are going to use micrometer to record metrics for each batch. For example, producer run the first time, batch id is 1, the second time batch id is 2. We are going to put batch id in header of message. And for the processor application, we want to change value of tag "batch_id" according to batch id of message. Is it possible? We did some test and find values of tag "batch_id" will contain all batch id processed. Could you kindly give some instructions? Thanks,

todaynowork
  • 976
  • 8
  • 12
  • I don't think it's possible . .https://github.com/micrometer-metrics/micrometer/issues/535 – vanillaSugar Aug 30 '19 at 06:29
  • have reviewed that issue. somebody said they could use the dynamic tag, but I am not sure how to code. – todaynowork Aug 30 '19 at 07:46
  • Does this answer your question? [Dynamic tag values for the Counter metric in Micrometer](https://stackoverflow.com/questions/59592118/dynamic-tag-values-for-the-counter-metric-in-micrometer) – Markus Pscheidt Oct 17 '22 at 14:11

0 Answers0