-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for Dynatrace V2 API #2619
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
Conversation
* Move Dynatrace metrics exporter for API v1 to a separate package * rename dynatrace exporter * use an enum for Dynatrace API versions. * make DynatraceNamingConvention public * fix formatting * rename classes to have version at the end, move enum to uppercase, remove thread factory from exporter * move naming convention and delegate to the v1 implementation * update config validation and tests * rename variables in test files * remove unused imports * split out validation * re-add the apiVersion check and test * update misleading comment and remove duplicate apiVersion check
Unfortunately Java 8 does not support private methods in interfaces (9+ does) and I'm not sure we should have a public validateV1 method
- javadoc - ctor/method reordering (to be consistent and ease diffing) - get the logger based on Class not by String - start the threadpool at the last step in the ctor - license - static imports
# Conflicts: # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/DynatraceNamingConvention.java # implementations/micrometer-registry-dynatrace/src/test/java/io/micrometer/dynatrace/v1/DynatraceNamingConventionV1Test.java
Co-authored-by: Armin Ruech <[email protected]>
…e-oss-contrib/micrometer into dynatrace-oss-contrib-add-dynatrace-registry-v2 # Conflicts: # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/AbstractDynatraceExporter.java # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/DynatraceApiVersion.java # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/DynatraceConfig.java # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/DynatraceMeterRegistry.java # implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/v1/DynatraceExporterV1.java # implementations/micrometer-registry-dynatrace/src/test/java/io/micrometer/dynatrace/DynatraceConfigTest.java
(Parenthesis is not a must in Groovy)
|
@pirgeo I tried to improve this a little, I haven't checked the validation logic and the tests (including the Nan/Inf behavior) but I'm going to do it soon. |
|
Hi @jonatan-ivanov, just wanted to check on the availability of these changes. We are using Dynatrace V1 APIs with micrometer-registry-dynatrace at the moment and looking forward to using the V2 APIs. So, when do you think these will changes will be released? |
|
@shank9918 After this PR get merged, you can use it as a snapshot release (should happen soon, see my previous comment about what needs to be done). |
(cherry picked from commit 46f2b77b747b017ba37a0ef585b98d0dc65c3c02)
… to be sent (cherry picked from commit 2c43bddc5e260d44dbc0f8f0b479e08fd18c3771) Co-authored-by: Georg Pirklbauer <[email protected]>
...ter-registry-dynatrace/src/test/java/io/micrometer/dynatrace/v2/DynatraceExporterV2Test.java
Outdated
Show resolved
Hide resolved
- Using MockClock instead of Thread.sleep - Improve test setup - Fix/improve tests for: Gauge, TimeGauge, Counter, FunctionCounter, Timer, FunctionTimer, LongTaskTimer, DistributionSummary
- Custom Meter - Invalid cases (also dedupe)
|
@pirgeo I think this is close to be merged, I fixed a couple of things:
I also have a few notes, just to double check if these are intended and you are fine with them:
Please notice Could you please check if these look ok for you? |
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.
@jonatan-ivanov Thanks, the changes are looking very good to me.
- Regarding the 0th percentile export: We would rather not export the extra percentile line. Do you have any suggestions as to how we could drop just that line, preferably without having to look through the created lines and dropping it after creation?
- Regarding the empty tags, this is something we would like to keep, for now. As you saw, empty tags are currently dropped upon ingestion, but might be used in the future. I have added suggestions to change the test method names.
...ter-registry-dynatrace/src/test/java/io/micrometer/dynatrace/v2/DynatraceExporterV2Test.java
Outdated
Show resolved
Hide resolved
...ter-registry-dynatrace/src/test/java/io/micrometer/dynatrace/v2/DynatraceExporterV2Test.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Georg Pirklbauer <[email protected]>
Co-authored-by: Georg Pirklbauer <[email protected]>
|
@pirgeo Great, I'm happy you liked them. Empty tags: Makes sense, thanks for catching the test names, I've merged your changes in. 0th percentile export: I agree. I think we should not export the extra percentile line, I wasn't 100% sure if it was intentional or not. I think there are two ways to solve this:
What do you think? |
|
I merged it based on the email exchange we had about this. |
|
@jonatan-ivanov Thanks a lot! Appreciate your commitment and your help :) |
see: #2295