Skip to content
Merged
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
9 changes: 5 additions & 4 deletions context/src/main/java/io/opentelemetry/context/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ static Context root() {
*
* <p>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
*/
Expand All @@ -129,7 +130,7 @@ static Executor taskWrapping(Executor executor) {
*
* <p>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.
*
Expand All @@ -150,7 +151,7 @@ static ExecutorService taskWrapping(ExecutorService executorService) {
*
* <p>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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}.
*
* <p>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,
Expand Down
Loading