Skip to content

Commit

Permalink
Fix ContextUsage snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Dec 11, 2024
1 parent 88899e2 commit 65b0fa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc-snippets/api/src/main/java/otel/ContextUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void contextUsage() throws Exception {
try (Scope scope = context.makeCurrent()) {
// The current context now contains the added value
// output => context value: value
System.out.println("context value: " + context.get(exampleContextKey));
System.out.println("context value: " + Context.current().get(exampleContextKey));
}

// The local context var still contains the added value
Expand Down

0 comments on commit 65b0fa6

Please sign in to comment.