Skip to content

Commit

Permalink
Fix java context usage example (#5766)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Dec 12, 2024
1 parent a61c277 commit 3c83660
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
[submodule "content-modules/opentelemetry-java-examples"]
path = content-modules/opentelemetry-java-examples
url = https://github.com/open-telemetry/opentelemetry-java-examples.git
javaexamples-pin = f9553ef
javaexamples-pin = 63cc9b4
2 changes: 1 addition & 1 deletion content/en/docs/languages/java/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public class ContextUsage {
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 3c83660

Please sign in to comment.