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

Implement custom metrics with multiple dimensions using Micrometer

panda
Guide

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?

4 REPLIES 4

radek_jasinski
DynaMight Guru
DynaMight Guru

Hi @panda 

I understand that you are using plugin (Micrometer monitoring & observability | Dynatrace HubDynatracehttps://www.dynatrace.com › Dynatrace ...) or OA for monitoring?

Radek

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.

WX20240201-193132@2x.png

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:

https://docs.dynatrace.com/docs/platform-modules/applications-and-microservices/services/request-att...

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