01 Feb 2024 10:00 AM - last edited on 07 Mar 2024 08:30 AM by Michal_Gebacki
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?
01 Feb 2024 11:07 AM
Hi @panda
I understand that you are using plugin (Micrometer monitoring & observability | Dynatrace HubDynatracehttps://www.dynatrace.com › Dynatrace ...) or OA for monitoring?
Radek
01 Feb 2024 11:36 AM
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.
01 Feb 2024 12:13 PM
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:
02 Feb 2024 02:00 AM
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.