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

Invert control when defining transformers #2673

Merged
merged 1 commit into from
May 3, 2021
Merged

Conversation

tylerbenson
Copy link
Contributor

This mainly reduces the number of maps that need to be constructed and avoids the risk of sizing incorrectly.

This is just a preliminary step. The stated benefits won't apply until subclasses have migrated.

This mainly reduces the number of maps that need to be constructed and avoids the risk of sizing incorrectly.
@tylerbenson tylerbenson added the tag: no release notes Changes to exclude from release notes label Apr 29, 2021
@tylerbenson tylerbenson requested a review from a team as a code owner April 29, 2021 20:42
Comment on lines -50 to -59
public Map<? extends ElementMatcher<? super MethodDescription>, String> transformers() {
Map<ElementMatcher<? super MethodDescription>, String> transformers = new HashMap<>();
transformers.put(isConstructor(), getClass().getName() + "$CaptureParentSpanAdvice");
transformers.put(
public void adviceTransformations(AdviceTransformation transformation) {
transformation.applyAdvice(isConstructor(), getClass().getName() + "$CaptureParentSpanAdvice");
transformation.applyAdvice(
isMethod()
.and(named("subscribe"))
.and(takesArguments(1))
.and(takesArgument(0, named("io.reactivex.Observer"))),
getClass().getName() + "$PropagateParentSpanAdvice");
return transformers;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a demonstration of the expected change required for each instrumenter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: no release notes Changes to exclude from release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants