Skip to content
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

[Dynatrace v2] Update to utils library v2 #4064

Conversation

pirgeo
Copy link
Contributor

@pirgeo pirgeo commented Sep 8, 2023

This PR updates the Dynatrace exporter v2 to use the new dynatrace-metric-utils library v2.0.0 which provides a big boost in performance while also reducing the memory overhead. v2 has been released on Maven central.

@@ -493,4 +524,23 @@ private void storeMetadataLine(Metric.Builder metricBuilder, Map<String, String>
}
}

private String extractMetricKey(String metadataLine) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't MetadataStep do this for us instead of encoding it into a string and then trying to decode it again?
This also feels quite brittle. Btw should the index start at 1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw should the index start at 1?

Yes that's on purpose, the first index will always be #, I added a clarifying comment in 0d6d7f0

@jonatan-ivanov jonatan-ivanov added enhancement A general enhancement registry: dynatrace A Dynatrace Registry related issue labels Sep 15, 2023
@jonatan-ivanov jonatan-ivanov added this to the 1.12.0-RC1 milestone Sep 15, 2023
Copy link
Contributor

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. 🙂
I addressed some comments while @pirgeo is out of office

@@ -493,4 +524,23 @@ private void storeMetadataLine(Metric.Builder metricBuilder, Map<String, String>
}
}

private String extractMetricKey(String metadataLine) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw should the index start at 1?

Yes that's on purpose, the first index will always be #, I added a clarifying comment in 0d6d7f0

jonatan-ivanov pushed a commit that referenced this pull request Sep 20, 2023
See gh-4064

Co-authored-by: Georg Pirklbauer <georg.pirklbauer@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
jonatan-ivanov added a commit that referenced this pull request Sep 20, 2023
@jonatan-ivanov
Copy link
Member

I polished the PR a bit and merged it in, thank you all for the contribution.

@arminru arminru deleted the update-util-library branch September 21, 2023 14:23
izeye added a commit to izeye/micrometer that referenced this pull request Oct 9, 2023
@izeye izeye mentioned this pull request Oct 9, 2023
shakuzen pushed a commit that referenced this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement registry: dynatrace A Dynatrace Registry related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants