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

Migrate WebMvcTags to ServerRequestObservationConvention #586

Merged
merged 37 commits into from
Oct 9, 2024

Conversation

Laurens-W
Copy link
Contributor

@Laurens-W Laurens-W commented Sep 4, 2024

What's your motivation?

Anyone you would like to review specifically?

@timtebeek

Any additional context

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#tag-providers-and-contributors-migration

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@Laurens-W Laurens-W added enhancement New feature or request boot-3.2 labels Sep 4, 2024
@Laurens-W Laurens-W requested a review from timtebeek September 4, 2024 12:15
@Laurens-W Laurens-W self-assigned this Sep 4, 2024
@Laurens-W Laurens-W force-pushed the spring-webmvctags-to-observations branch from 79f12c4 to 1270277 Compare September 4, 2024 13:31
@Laurens-W Laurens-W force-pushed the spring-webmvctags-to-observations branch from 52d92f3 to 6f27d4e Compare September 5, 2024 14:54
Laurens-W and others added 2 commits September 9, 2024 14:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Laurens-W and others added 3 commits September 19, 2024 17:15
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

@Laurens-W Laurens-W marked this pull request as ready for review September 26, 2024 08:00
@Laurens-W Laurens-W requested a review from timtebeek September 26, 2024 08:03
Comment on lines 97 to 98
" public KeyValues getLowCardinalityKeyValues(ServerRequestObservationContext context) {\n" +
" KeyValues values = super.getLowCardinalityKeyValues(context);\n" +
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you explore whether to use low cardinality versus high cardinality? It seems more risky to assume low cardinality. Any thoughts on that subject?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're very much correct in saying choosing the wrong one can cause big issues in the ingestion of traces/metrics.
It'd be safer to apply high and require manual shifting of high/low than adding all as low and potentially causing issues!

I'll change it to high!

Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Added a test that fails just from having another method without any arguments, as that leads to class cast exception. Likely you'll need some form of limiting when to modify methods.

@timtebeek timtebeek self-requested a review October 9, 2024 13:55
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Great to see; I understand this one wasn't easy with the lack of public examples and the number of options that needed to be converted. Thanks for diving in! Let's see how it holds up in practice with the coming release.

@timtebeek timtebeek merged commit 9d3a3f0 into main Oct 9, 2024
2 checks passed
@timtebeek timtebeek deleted the spring-webmvctags-to-observations branch October 9, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boot-3.2 enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants