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

Copy options tags to transactions. #1198

Merged
merged 5 commits into from
Jan 22, 2021
Merged

Copy options tags to transactions. #1198

merged 5 commits into from
Jan 22, 2021

Conversation

maciejwalkowiak
Copy link
Contributor

📜 Description

Copy options tags to transactions.

💡 Motivation and Context

Fixes #1163

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No breaking changes

🔮 Next steps

Perhaps tags from the scope (and potentially other properties from the scope) should be applied on transactions too?

Comment on lines +403 to +411
if (transaction.getTags() == null) {
transaction.setTags(new HashMap<>(options.getTags()));
} else {
for (Map.Entry<String, String> item : options.getTags().entrySet()) {
if (!transaction.getTags().containsKey(item.getKey())) {
transaction.setTag(item.getKey(), item.getValue());
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

what's about the tags set on the scope? should we also copy them?

cc @bruno-garcia

Copy link
Member

Choose a reason for hiding this comment

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

oof, yeah we're missing that. All tags should be added

@maciejwalkowiak maciejwalkowiak merged commit 58c6970 into main Jan 22, 2021
@maciejwalkowiak maciejwalkowiak deleted the gh-1163 branch January 22, 2021 10:36
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.

Transactions are missing configured tags
3 participants