Skip to content

Commit f5d2104

Browse files
authored
docs: fix ByteBuddy Advice annotation parameter from 'inlined' to 'inline' (#14044)
1 parent 083f3b6 commit f5d2104

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/contributing/writing-instrumentation-module.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ Due to the changes needed on most of the instrumentation modules the migration c
394394
we thus have to implement it in two steps:
395395

396396
- `InstrumentationModule#isIndyModule` implementation return `true` (and changes needed to make it indy compatible)
397-
- set `inlined = false` on advice methods annotated with `@Advice.OnMethodEnter` or `@Advice.OnMethodExit`
397+
- set `inline = false` on advice methods annotated with `@Advice.OnMethodEnter` or `@Advice.OnMethodExit`
398398

399399
The `otel.javaagent.experimental.indy` (default `false`) configuration option allows to opt-in for
400400
using "indy". When set to `true`, the `io.opentelemetry.javaagent.tooling.instrumentation.indy.AdviceTransformer`
@@ -403,7 +403,7 @@ be removed once all the instrumentations are "indy native".
403403

404404
This configuration is automatically enabled in CI with `testIndy*` checks or when the `-PtestIndy=true` parameter is added to gradle.
405405

406-
In order to preserve compatibility with both instrumentation strategies, we have to omit the `inlined = false`
406+
In order to preserve compatibility with both instrumentation strategies, we have to omit the `inline = false`
407407
from the advice method annotations.
408408

409409
We have three sets of instrumentation modules:
@@ -445,12 +445,12 @@ return a value from the enter advice and get the value in the exit advice with a
445445
with `@Advice.Enter`, for example:
446446

447447
```java
448-
@Advice.OnMethodEnter(suppress = Throwable.class, inlined = false)
448+
@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
449449
public static Object onEnter(@Advice.Argument(1) Object request) {
450450
return "enterValue";
451451
}
452452

453-
@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class, inlined = false)
453+
@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class, inline = false)
454454
public static void onExit(@Advice.Argument(1) Object request,
455455
@Advice.Enter Object enterValue) {
456456
// do something with enterValue
@@ -467,7 +467,7 @@ annotated parameters, however modifying the values is done through the advice me
467467
and `@Advice.AssignReturned.ToArguments` annotation:
468468

469469
```java
470-
@Advice.OnMethodEnter(suppress = Throwable.class, inlined = false)
470+
@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
471471
@Advice.AssignReturned.ToArguments(@ToArgument(1))
472472
public static Object onEnter(@Advice.Argument(1) Object request) {
473473
return "hello";
@@ -487,7 +487,7 @@ annotated parameter, however modifying the value is done through the advice meth
487487
and `@Advice.AssignReturned.ToReturned`.
488488

489489
```java
490-
@Advice.OnMethodExit(suppress = Throwable.class, inlined = false)
490+
@Advice.OnMethodExit(suppress = Throwable.class, inline = false)
491491
@Advice.AssignReturned.ToReturned
492492
public static Object onExit(@Advice.Return Object returnValue) {
493493
return "hello";
@@ -504,7 +504,7 @@ annotated parameter, however modifying the value is done through the advice meth
504504
and `@Advice.AssignReturned.ToFields` annotation.
505505

506506
```java
507-
@Advice.OnMethodEnter(suppress = Throwable.class, inlined = false)
507+
@Advice.OnMethodEnter(suppress = Throwable.class, inline = false)
508508
@Advice.AssignReturned.ToFields(@ToField("fieldName"))
509509
public static Object onEnter(@Advice.FieldValue("fieldName") Object originalFieldValue) {
510510
return "newFieldValue";

0 commit comments

Comments
 (0)