From 3c83660314479231cf873c1c99d0d66b69b0053e Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:25:26 -0600 Subject: [PATCH] Fix java context usage example (#5766) --- .gitmodules | 2 +- content-modules/opentelemetry-java-examples | 2 +- content/en/docs/languages/java/api.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 510ebd44bdb2..db570f1fafb6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/content-modules/opentelemetry-java-examples b/content-modules/opentelemetry-java-examples index f9553eff58aa..63cc9b44310f 160000 --- a/content-modules/opentelemetry-java-examples +++ b/content-modules/opentelemetry-java-examples @@ -1 +1 @@ -Subproject commit f9553eff58aabb28dabee8c14274d9860b4c52bd +Subproject commit 63cc9b44310f1ac2e7b37e6402fe48e9e0efe3ef diff --git a/content/en/docs/languages/java/api.md b/content/en/docs/languages/java/api.md index be8781e027fd..9d8d4fb4b62c 100644 --- a/content/en/docs/languages/java/api.md +++ b/content/en/docs/languages/java/api.md @@ -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