Skip to content

Commit b0ba7dc

Browse files
authored
Fix API usage typos (#502)
1 parent 34340b1 commit b0ba7dc

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

doc-snippets/api/src/main/java/otel/AsyncCounterUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void asyncCounterUsage(Meter meter) {
2626
// Uncomment to optionally change the type to double
2727
// .ofDoubles()
2828
.buildWithCallback(
29-
// the callback is invoked a MetricReader reads metrics
29+
// the callback is invoked when a MetricReader reads metrics
3030
observableMeasurement -> {
3131
long currentWidgetCount = widgetCount.get();
3232

doc-snippets/api/src/main/java/otel/AsyncGaugeUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void asyncGaugeUsage(Meter meter) {
2525
// Uncomment to optionally change the type to long
2626
// .ofLongs()
2727
.buildWithCallback(
28-
// the callback is invoked a MetricReader reads metrics
28+
// the callback is invoked when a MetricReader reads metrics
2929
observableMeasurement -> {
3030
double currentWidgetCount = processingLineTemp.get();
3131

doc-snippets/api/src/main/java/otel/AsyncUpDownCounterUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void asyncUpDownCounterUsage(Meter meter) {
2525
// Uncomment to optionally change the type to double
2626
// .ofDoubles()
2727
.buildWithCallback(
28-
// the callback is invoked a MetricReader reads metrics
28+
// the callback is invoked when a MetricReader reads metrics
2929
observableMeasurement -> {
3030
long currentWidgetCount = queueLength.get();
3131

doc-snippets/api/src/main/java/otel/ContextUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public static void contextUsage() throws Exception {
4949
ExecutorService executorService = Executors.newSingleThreadExecutor();
5050
ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
5151

52-
// Context instances can be explicitly passed around application code, but its more convenient
52+
// Context instances can be explicitly passed around application code, but it's more convenient
5353
// to use implicit context, calling Context.makeCurrent() and accessing via Context.current().
5454
// Context provides a number of utilities for implicit context propagation. These utilities wrap
55-
// utility classes like Scheduler, and ExecutorService, ScheduledExecutorService, Runnable,
55+
// utility classes like Scheduler, ExecutorService, ScheduledExecutorService, Runnable,
5656
// Callable, Consumer, Supplier, Function, etc and modify their behavior to call
5757
// Context.makeCurrent() before running.
5858
context.wrap(ContextUsage::callable).call();

doc-snippets/api/src/main/java/otel/GaugeUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class GaugeUsage {
1414
private static final Attributes WIDGET_RED_CIRCLE = Util.WIDGET_RED_CIRCLE;
1515

1616
public static void gaugeUsage(Meter meter) {
17-
// Construct a gauge to record measurements as they occur when cannot be spatially
17+
// Construct a gauge to record measurements as they occur, which cannot be spatially
1818
// re-aggregated.
1919
DoubleGauge gauge =
2020
meter

0 commit comments

Comments
 (0)