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

Allow adding multiple ContextStore fields to one key class, part 1 #4067

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

mateuszrzeszutek
Copy link
Member

We've been using a Map<String, String> to store the ContextStore mappings for a single instrumentation, but that doesn't really work when you need to add >1 context field in a single instrumentation module (because the map value will be overwritten).
This is only the first PR, containing just API/agent changes -- muzzle codegen plugin changes will be added in the next one(s).

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

👍


public boolean hasMapping(String keyClassName, String contextClassName) {
return entrySet.contains(
new AbstractMap.SimpleImmutableEntry<>(keyClassName, contextClassName));
Copy link
Member

Choose a reason for hiding this comment

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

i didn't know about this public Map.Entry implementation!

Copy link
Member Author

Choose a reason for hiding this comment

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

I just learned about it yesterday too 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants