-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Add support for Dynatrace metrics v2 API #26258
Add support for Dynatrace metrics v2 API #26258
Conversation
@pirgeo thank you for the PR but I am going to close this now as it isn't actionable. There is no way for us to review the code as the changes in Micrometer are not available yet. When micrometer has a build with the necessary changes for this PR, we can obviously reconsider. |
@snicoll The changes were merged to micrometer: micrometer-metrics/micrometer#2619 |
...springframework/boot/actuate/autoconfigure/metrics/export/dynatrace/DynatraceProperties.java
Outdated
Show resolved
Hide resolved
...rk/boot/actuate/autoconfigure/metrics/export/dynatrace/DynatracePropertiesConfigAdapter.java
Show resolved
Hide resolved
spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc
Outdated
Show resolved
Hide resolved
---- | ||
|
||
You can also change the interval at which metrics are sent to Dynatrace: | ||
You can also change the interval at which metrics are sent to Dynatrace (works for both API versions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this applies to both API versions, I don't think it belongs in the API v1 section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I added a subsection for version independent settings.
Given that there are some configuration properties that are specific to v1 and some that are specific to v2, I wonder if we should introduce separate groups for those. Properties that are common to both version of the API would remain at |
I think that's an interesting idea. That said our influx support has the same problem and we're currently mapping the same way Micrometer does. I don't know if there's a precedent where our config diverges quite a bit from the related Micrometer's |
Would that be a breaking change, or is there a way to do this without breaking existing |
@pirgeo On Boot side it depends how the Boot Team wants to handle this. |
Co-authored-by: Armin Ruech <[email protected]>
ff8077d
to
692decd
Compare
Thanks @jonatan-ivanov. I also think the proposal makes sense. We would also prefer to introduce this as a non-breaking, additive change. This would allow us to provide a version compatible with Micrometer 1.x without having to wait for a 2.x release. I have also moved the documentation to the new location. The CI is currently breaking, since this code relies on the |
@snicoll @wilkinsona Would it make sense to you to depend on Micrometer 1.8.0 in |
Yes, I think so. We can do that once we have some dates for the Micrometer 1.8 milestones and we know that the schedules line up. |
I've pushed a branch which hopefully illustrates what I had in mind. The approach is to move v1- and v2-specific properties beneath Rather than having a property for the API version, it is now inferred based on whether or not the device ID has set. A downside of this approach is that a user who is attempting to use the V1 API will not get an error message is they forget to set the device ID. Instead, an attempt will be made to use the V2 API. The upside of the approach is that the IDE experience is better as auto-completion guides you towards the right properties and there's no chance of, for example, setting the API version to v1 and then trying to configure v2-specific properties. Thoughts? |
Hi @wilkinsona, Thanks for the suggestion, this is great. We have a small change in mind: would it be possible to rename |
Thanks for taking a look, @pirgeo. We don't use hyphens in configuration property prefixes so we try to keep each |
@wilkinsona Oh, I see. |
GitHub's giving me a 403 when I try to push to the |
4090f20
to
4cdea7b
Compare
@wilkinsona I have pushed your commit and refined the documentation, it looks good from our end now. Thanks for your help! |
I can take care of that. I'll rebase it before merging it and that'll pick up the upgrade to 1.8.0-M1. |
@pirgeo Thanks very much for making your first contribution to Spring Boot. This has now been merged into |
@wilkinsona Thanks a lot! |
This PR contains new additions to the properties that allow Micrometer to export to two different Dynatrace APIs. The code in the two Micrometer PRs (see below) depends on this, and will hopefully be included in the 1.8.0 release of Micrometer.
Resolves #24978