Hi all,
I’m making a prometheus extension where metrics named with the id of the producer thread as in the code example. Right now each thread generates a separate dynatrace metric, but I would prefer the thread id as a dimension and only one metric named myapp.Smscntr. Is there any solution to this?
My current code:
prometheus:<br> - group: myapp metrics 0<br> interval:<br> minutes: 1<br> featureSet: all<br> dimensions:<br> - key: myapp<br> value: const:myapp<br> subgroups:<br> <br> - subgroup: myapp global gauge<br> dimensions:<br> - key: global_gauges<br> value: const:global_gauges<br> metrics:<br> <br><br> - key: myapp.Smscntr_Thread_0<br> value: metric:Smscntr_Thread:0<br> type: gauge<br> featureSet: all<br><br><br> - key: myapp.Smscntr_Thread_1<br> value: metric:Smscntr_Thread:1<br> type: gauge<br> featureSet: all<br><br><br> - key: myapp.Smscntr_Thread_2<br> value: metric:Smscntr_Thread:2<br> type: gauge<br> featureSet: all
Thanks,
Peter