Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implement custom metrics with multiple dimensions using Micrometer


I want to monitor my Spring Boot business code, and we have dimensions such as location, companyName, createdDate, and createdBy. How can I set values for these dimensions using Micrometer? Are there any code examples?


DynaMight Guru
DynaMight Guru

Hi @panda 

I understand that you are using plugin (Micrometer monitoring & observability | Dynatrace HubDynatrace › Dynatrace ...) or OA for monitoring?


Have a nice day!

Hi @radek_jasinski ,
Thank you for your response. To clarify, I'm uncertain whether by implementing the following scenario (which is a test) in my  web applications, Dynatrace will recognize a metric named "my-company-metric" with dimensions such as country, companyName, companyId, and location. My goal is to use "my-company-metric" for creating dashboards which could split by country, companyName, companyId, and location, or configuring alerts.


I would use Request Attribute for this purpose. You need to indicate where you want the DT to retrieve the information from and you can filter by data based on that:

Have a nice day!

Hi @radek_jasinski ,

I want to avoid using request attributes and instead leverage Micrometer to construct custom metrics. These custom metrics should be visible in the Data Explorer, allowing you to create charts that provide a comprehensive view of your business metrics. is there any good java code example? I hope I clarify it clearly.


Featured Posts