diff --git a/context/src/main/java/io/opentelemetry/context/Context.java b/context/src/main/java/io/opentelemetry/context/Context.java index cfa4fa98950..c5151571ec9 100644 --- a/context/src/main/java/io/opentelemetry/context/Context.java +++ b/context/src/main/java/io/opentelemetry/context/Context.java @@ -112,8 +112,9 @@ static Context root() { * *
This is generally used to create an {@link Executor} which will forward the {@link Context} * during an invocation to another thread. For example, you may use something like {@code Executor - * dbExecutor = Context.wrapTasks(threadPool)} to ensure calls like {@code dbExecutor.execute(() - * -> database.query())} have {@link Context} available on the thread executing database queries. + * dbExecutor = Context.taskWrapping(threadPool)} to ensure calls like {@code + * dbExecutor.execute(() -> database.query())} have {@link Context} available on the thread + * executing database queries. * * @since 1.1.0 */ @@ -129,7 +130,7 @@ static Executor taskWrapping(Executor executor) { * *
This is generally used to create an {@link ExecutorService} which will forward the {@link * Context} during an invocation to another thread. For example, you may use something like {@code - * ExecutorService dbExecutor = Context.wrapTasks(threadPool)} to ensure calls like {@code + * ExecutorService dbExecutor = Context.taskWrapping(threadPool)} to ensure calls like {@code * dbExecutor.execute(() -> database.query())} have {@link Context} available on the thread * executing database queries. * @@ -150,7 +151,7 @@ static ExecutorService taskWrapping(ExecutorService executorService) { * *
This is generally used to create an {@link ScheduledExecutorService} which will forward the * {@link Context} during an invocation to another thread. For example, you may use something like - * {@code ScheduledExecutorService dbExecutor = Context.wrapTasks(threadPool)} to ensure calls + * {@code ScheduledExecutorService dbExecutor = Context.taskWrapping(threadPool)} to ensure calls * like {@code dbExecutor.execute(() -> database.query())} have {@link Context} available on the * thread executing database queries. * diff --git a/context/src/main/java/io/opentelemetry/context/propagation/TextMapPropagator.java b/context/src/main/java/io/opentelemetry/context/propagation/TextMapPropagator.java index 8505d9a49a5..2798f706233 100644 --- a/context/src/main/java/io/opentelemetry/context/propagation/TextMapPropagator.java +++ b/context/src/main/java/io/opentelemetry/context/propagation/TextMapPropagator.java @@ -82,7 +82,7 @@ static TextMapPropagator noop() { /** * The propagation fields defined. If your carrier is reused, you should delete the fields here - * before calling {@link #inject(Context, Object, TextMapSetter)} )}. + * before calling {@link #inject(Context, Object, TextMapSetter)}. * *
For example, if the carrier is a single-use or immutable request object, you don't need to * clear fields as they couldn't have been set before. If it is a mutable, retryable object,