-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Dynatrace metrics API v2 #2295
Comments
We would probably want the API to be GA before we merge and release it, but if you want to work on a pull request in the meantime, that's fine. Is there a timeline for the API becoming stable? |
@obarcelonap Have you made any progress on this? v1 has some limitations that v2 solves. The major issue we have is having duplicate keys names with different dimensions. In v1 this results in a "400 Constraint Violation" where v2 handles it as expected. This makes v1 unusable for our use case. |
@obarcelonap I opened a support ticket with the Dynatrace team regarding the GA for the v2. Here's the reponse... "The ingest endpoint is already stable at this point and the official version of v2 is planned to be available some time at the end of Q1/ 2021." On a side note I was able to find your fork with the work you did for the new api. I had one concern regarding creating a dynatrace2 version. This would require some coordination with the spring-boot team to change/create a new DynatraceMetricsExportAutoConfiguration as the package names will be different. |
@jmcolyerkr I pushed the progress into a branch in my repo, branch is working and reports gauges and counters correctly. It is pending to stabilize it, trying out all the samples and possible corner cases. Regarding creating a new implementation module for the 2nd version, the idea is to have a clean start for this new version as I think it has less complexity. Also because we don't need to manage compatibility with v1 - using same implementation and having a prop with the version could create problems. For example, defaulting to v2, may end with new metrics keys for the same metrics, causing confusion to the users. Or defaulting to v1 would mean users may need to realize there is other impl and manually change it which I think is against micrometer/spring boot philosophy to provide good defaults. |
@obarcelonap thanks for your work putting the new library together! I will build it locally and test it in our environment and report back. |
@obarcelonap Reporting back... These 3 properties are now missing deviceId, group, technologyType. DeviceId I believe is a good dimension that is added and makes it easy to find the metrics under custom devices. Registry Timer doesn't appear to be sent... my.timer does not show up in the POST body.
my.count does show up in the POST body. There are a few errors which seems to be case sensitivity and possibly not quoted properly.
|
@jmcolyerkr Thank you for testing things out. I'm helping @obarcelonap with this. With the deviceId, group & technologyType in the configuration, these were all needed in the v1 API because each metric had to be assigned to a custom device. However with the v2 API this is not the case as metrics can now be free of any entity. This means that now a custom device isn't needed for metrics to be available in Dynatrace. There is a new reserved dimension which is used to assign the metrics to an existing entity so if there is the OneAgent on the host we can now map these metrics directly to that process or host. From the documentation :
With this new properties could be added to specify the HOST ID or the Process Group Instance ID and append one of those values to the metric. As for the timer's I don't believe any timer meter type has been enabled, only gauge and counter types. At the moment I'm not sure why your counter isn't showing up, but I'll have a look. Finally, there are some known issues with the quoting that I'm working on now, but also looks like the dimensions need to be lowercase so I'll look into that as well. Again from the docs :
|
@damass Host Id or Instance Id wouldn't be good for the aggregation I need. For example, if i have 4 instances I want to know the HTTP failure rate for all 4. I could add a common tag for "application", but deviceId is what I was using. Also, if you look in Dynatrace -> Technologies -> Custom Devices the metrics would show up under the deviceId given. IMO it should be an optional property. The timer is a must for me as that's the main reason for me pulling in this library. Long story short I use it to create a dashboard which shows performance at class/method level. I know you can drill in but I get a nice easy dashboard. Feel free to reach out to me and I can do additional testing and/or drop a few lines of code. EDIT - my instance id's will be dynamic and change often, so I can't "hard code" group them. |
@jmcolyerkr I've done some updates and now all the different Meter Types should be supported. Also, I've added some additional properties to help with what we were talking about. There are now Please note that the Since you may already have an existing Custom Device for these metrics you can use the All of the new properties as well as the other dimensions will be available in the new metrics UI screen: https://{your-environment-id}.live.dynatrace.com/ui/metrics |
Is there anything preventing these pull requests from being merged? I thought there was a wait for V2 to be officially GA's but I believe that it has been. Let me know how I can help. |
@shakuzen, would you be the one to review the PR for this issue? Please let me know if there is anything that needs to be changed or anyone else to loop in. |
Hi there, thanks for all the open source contributors here! I just stopped here to say that as a user of Dynatrace, I would really really like this library to be released to start using it from our applications. 🙏 |
@jpandres You can use it right now with the V1 API: https://micrometer.io/docs/registry/dynatrace |
Hi Jonatan, thanks for the suggestion. I am using it (or trying to, because I have issues when going through Active Gates), but API v2 is way less restrictive and would prefer to use it when this library becomes available. |
Closing this since the feature was merged: #2619 |
Users who have been looking forward to this feature, please try out 1.8 snapshots and let us know any feedback on it. |
Dynatrace has released a new metric ingestion API much flexible than previous one.
https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/
Ingestion flow has changed significantly:
custom:
prefix)Since there are quite changes and new api is still in EAP, I'd propose to create a new shinny meter registry, let's say
micrometer-registry-dynatrace2
and deprecate the first versionmicrometer-registry-dynatrace
so first version would be still available to be used to do not lose the history of the custom metrics registered with v1.If is ok from your side, I'd try to contribute in this new registry in the upcoming days.
The text was updated successfully, but these errors were encountered: