@@ -82,26 +82,26 @@ public void transform(TypeTransformer transformer) {
8282 @ SuppressWarnings ("unused" )
8383 public static class WithSpanAdvice {
8484
85- public static class AdviceScope {
85+ public static class WithSpanAdviceScope {
8686 private final Method method ;
8787 private final Context context ;
8888 private final Scope scope ;
8989
90- public AdviceScope (Method method , Context context , Scope scope ) {
90+ public WithSpanAdviceScope (Method method , Context context , Scope scope ) {
9191 this .method = method ;
9292 this .context = context ;
9393 this .scope = scope ;
9494 }
9595
9696 @ Nullable
97- public static AdviceScope start (Method method ) {
97+ public static WithSpanAdviceScope start (Method method ) {
9898 Instrumenter <Method , Object > instrumenter = instrumenter ();
9999 Context current = AnnotationSingletons .getContextForMethod (method );
100100 if (!instrumenter .shouldStart (current , method )) {
101101 return null ;
102102 }
103103 Context context = instrumenter .start (current , method );
104- return new AdviceScope (method , context , context .makeCurrent ());
104+ return new WithSpanAdviceScope (method , context , context .makeCurrent ());
105105 }
106106
107107 public Object end (@ Nullable Object returnValue , @ Nullable Throwable throwable ) {
@@ -114,18 +114,18 @@ public Object end(@Nullable Object returnValue, @Nullable Throwable throwable) {
114114
115115 @ Nullable
116116 @ Advice .OnMethodEnter (suppress = Throwable .class )
117- public static AdviceScope onEnter (@ Advice .Origin Method originMethod ) {
117+ public static WithSpanAdviceScope onEnter (@ Advice .Origin Method originMethod ) {
118118 // Every usage of @Advice.Origin Method is replaced with a call to Class.getMethod, copy it
119119 // to advice scope so that there would be only one call to Class.getMethod.
120- return AdviceScope .start (originMethod );
120+ return WithSpanAdviceScope .start (originMethod );
121121 }
122122
123123 @ AssignReturned .ToReturned
124124 @ Advice .OnMethodExit (onThrowable = Throwable .class , suppress = Throwable .class )
125125 public static Object stopSpan (
126126 @ Advice .Return (typing = Assigner .Typing .DYNAMIC ) Object returnValue ,
127127 @ Advice .Thrown @ Nullable Throwable throwable ,
128- @ Advice .Enter @ Nullable AdviceScope adviceScope ) {
128+ @ Advice .Enter @ Nullable WithSpanAdviceScope adviceScope ) {
129129 if (adviceScope != null ) {
130130 return adviceScope .end (returnValue , throwable );
131131 }
@@ -136,29 +136,30 @@ public static Object stopSpan(
136136 @ SuppressWarnings ("unused" )
137137 public static class WithSpanAttributesAdvice {
138138
139- public static class AdviceScope {
139+ public static class WithSpanAttributesAdviceScope {
140140 private final Method method ;
141141 private final MethodRequest request ;
142142 private final Context context ;
143143 private final Scope scope ;
144144
145- public AdviceScope (Method method , MethodRequest request , Context context , Scope scope ) {
145+ public WithSpanAttributesAdviceScope (
146+ Method method , MethodRequest request , Context context , Scope scope ) {
146147 this .method = method ;
147148 this .request = request ;
148149 this .context = context ;
149150 this .scope = scope ;
150151 }
151152
152153 @ Nullable
153- public static AdviceScope start (Method method , Object [] args ) {
154+ public static WithSpanAttributesAdviceScope start (Method method , Object [] args ) {
154155 Instrumenter <MethodRequest , Object > instrumenter = instrumenterWithAttributes ();
155156 Context current = AnnotationSingletons .getContextForMethod (method );
156157 MethodRequest request = new MethodRequest (method , args );
157158 if (!instrumenter .shouldStart (current , request )) {
158159 return null ;
159160 }
160161 Context context = instrumenter .start (current , request );
161- return new AdviceScope (method , request , context , context .makeCurrent ());
162+ return new WithSpanAttributesAdviceScope (method , request , context , context .makeCurrent ());
162163 }
163164
164165 public Object end (@ Nullable Object returnValue , @ Nullable Throwable throwable ) {
@@ -172,21 +173,21 @@ public Object end(@Nullable Object returnValue, @Nullable Throwable throwable) {
172173
173174 @ Nullable
174175 @ Advice .OnMethodEnter (suppress = Throwable .class )
175- public static AdviceScope onEnter (
176+ public static WithSpanAttributesAdviceScope onEnter (
176177 @ Advice .Origin Method originMethod ,
177178 @ Advice .AllArguments (typing = Assigner .Typing .DYNAMIC ) Object [] args ) {
178179
179180 // Every usage of @Advice.Origin Method is replaced with a call to Class.getMethod, copy it
180181 // to advice scope so that there would be only one call to Class.getMethod.
181- return AdviceScope .start (originMethod , args );
182+ return WithSpanAttributesAdviceScope .start (originMethod , args );
182183 }
183184
184185 @ AssignReturned .ToReturned
185186 @ Advice .OnMethodExit (onThrowable = Throwable .class , suppress = Throwable .class )
186187 public static Object stopSpan (
187188 @ Advice .Return (typing = Assigner .Typing .DYNAMIC ) Object returnValue ,
188189 @ Advice .Thrown Throwable throwable ,
189- @ Advice .Enter AdviceScope adviceScope ) {
190+ @ Advice .Enter WithSpanAttributesAdviceScope adviceScope ) {
190191 if (adviceScope != null ) {
191192 return adviceScope .end (returnValue , throwable );
192193 }
0 commit comments