diff --git a/doc-snippets/api/src/main/java/otel/AsyncCounterUsage.java b/doc-snippets/api/src/main/java/otel/AsyncCounterUsage.java index a6123ea0e6..e325c6c74e 100644 --- a/doc-snippets/api/src/main/java/otel/AsyncCounterUsage.java +++ b/doc-snippets/api/src/main/java/otel/AsyncCounterUsage.java @@ -26,7 +26,7 @@ public static void asyncCounterUsage(Meter meter) { // Uncomment to optionally change the type to double // .ofDoubles() .buildWithCallback( - // the callback is invoked a MetricReader reads metrics + // the callback is invoked when a MetricReader reads metrics observableMeasurement -> { long currentWidgetCount = widgetCount.get(); diff --git a/doc-snippets/api/src/main/java/otel/AsyncGaugeUsage.java b/doc-snippets/api/src/main/java/otel/AsyncGaugeUsage.java index 4f8f071a1e..1ffbca0ffe 100644 --- a/doc-snippets/api/src/main/java/otel/AsyncGaugeUsage.java +++ b/doc-snippets/api/src/main/java/otel/AsyncGaugeUsage.java @@ -25,7 +25,7 @@ public static void asyncGaugeUsage(Meter meter) { // Uncomment to optionally change the type to long // .ofLongs() .buildWithCallback( - // the callback is invoked a MetricReader reads metrics + // the callback is invoked when a MetricReader reads metrics observableMeasurement -> { double currentWidgetCount = processingLineTemp.get(); diff --git a/doc-snippets/api/src/main/java/otel/AsyncUpDownCounterUsage.java b/doc-snippets/api/src/main/java/otel/AsyncUpDownCounterUsage.java index f6b4a57b54..ea1293a3ba 100644 --- a/doc-snippets/api/src/main/java/otel/AsyncUpDownCounterUsage.java +++ b/doc-snippets/api/src/main/java/otel/AsyncUpDownCounterUsage.java @@ -25,7 +25,7 @@ public static void asyncUpDownCounterUsage(Meter meter) { // Uncomment to optionally change the type to double // .ofDoubles() .buildWithCallback( - // the callback is invoked a MetricReader reads metrics + // the callback is invoked when a MetricReader reads metrics observableMeasurement -> { long currentWidgetCount = queueLength.get(); diff --git a/doc-snippets/api/src/main/java/otel/ContextUsage.java b/doc-snippets/api/src/main/java/otel/ContextUsage.java index 524c697f67..c7ba70cd39 100644 --- a/doc-snippets/api/src/main/java/otel/ContextUsage.java +++ b/doc-snippets/api/src/main/java/otel/ContextUsage.java @@ -49,10 +49,10 @@ public static void contextUsage() throws Exception { ExecutorService executorService = Executors.newSingleThreadExecutor(); ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1); - // Context instances can be explicitly passed around application code, but its more convenient + // Context instances can be explicitly passed around application code, but it's more convenient // to use implicit context, calling Context.makeCurrent() and accessing via Context.current(). // Context provides a number of utilities for implicit context propagation. These utilities wrap - // utility classes like Scheduler, and ExecutorService, ScheduledExecutorService, Runnable, + // utility classes like Scheduler, ExecutorService, ScheduledExecutorService, Runnable, // Callable, Consumer, Supplier, Function, etc and modify their behavior to call // Context.makeCurrent() before running. context.wrap(ContextUsage::callable).call(); diff --git a/doc-snippets/api/src/main/java/otel/GaugeUsage.java b/doc-snippets/api/src/main/java/otel/GaugeUsage.java index 137209fbf5..a31d405002 100644 --- a/doc-snippets/api/src/main/java/otel/GaugeUsage.java +++ b/doc-snippets/api/src/main/java/otel/GaugeUsage.java @@ -14,7 +14,7 @@ public class GaugeUsage { private static final Attributes WIDGET_RED_CIRCLE = Util.WIDGET_RED_CIRCLE; public static void gaugeUsage(Meter meter) { - // Construct a gauge to record measurements as they occur when cannot be spatially + // Construct a gauge to record measurements as they occur, which cannot be spatially // re-aggregated. DoubleGauge gauge = meter