Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static class CaptureParentSpanAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onConstruct(@Advice.This final Completable completable) {
Context parentContext = currentContext();
if (parentContext != null && parentContext != rootContext()) {
if (parentContext != rootContext()) {
InstrumentationContext.get(Completable.class, Context.class)
.put(completable, parentContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static class CaptureParentSpanAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onConstruct(@Advice.This final Flowable<?> flowable) {
Context parentContext = currentContext();
if (parentContext != null && parentContext != rootContext()) {
if (parentContext != rootContext()) {
InstrumentationContext.get(Flowable.class, Context.class).put(flowable, parentContext);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class CaptureParentSpanAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onConstruct(@Advice.This final Maybe<?> maybe) {
Context parentContext = currentContext();
if (parentContext != null && parentContext != rootContext()) {
if (parentContext != rootContext()) {
InstrumentationContext.get(Maybe.class, Context.class).put(maybe, parentContext);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class CaptureParentSpanAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onConstruct(@Advice.This final Observable<?> observable) {
Context parentContext = currentContext();
if (parentContext != null) {
if (parentContext != rootContext()) {
InstrumentationContext.get(Observable.class, Context.class).put(observable, parentContext);
}
}
Expand All @@ -52,7 +52,7 @@ public static ContextScope onSubscribe(
if (observer != null) {
Context parentContext =
InstrumentationContext.get(Observable.class, Context.class).get(observable);
if (parentContext != null && parentContext != rootContext()) {
if (parentContext != null) {
// wrap the observer so spans from its events treat the captured span as their parent
observer = new TracingObserver<>(observer, parentContext);
// attach the context here in case additional observers are created during subscribe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static class CaptureParentSpanAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onConstruct(@Advice.This final Single<?> single) {
Context parentContext = currentContext();
if (parentContext != null) {
if (parentContext != rootContext()) {
InstrumentationContext.get(Single.class, Context.class).put(single, parentContext);
}
}
Expand All @@ -52,7 +52,7 @@ public static ContextScope onSubscribe(
@Advice.Argument(value = 0, readOnly = false) SingleObserver<?> observer) {
if (observer != null) {
Context parentContext = InstrumentationContext.get(Single.class, Context.class).get(single);
if (parentContext != null && parentContext != rootContext()) {
if (parentContext != null) {
// wrap the observer so spans from its events treat the captured span as their parent
observer = new TracingSingleObserver<>(observer, parentContext);
// attach the context here in case additional observers are created during subscribe
Expand Down