Skip to content

Commit 6ec03dd

Browse files
committed
PR feedback
1 parent 88d98e6 commit 6ec03dd

File tree

11 files changed

+17
-15
lines changed

11 files changed

+17
-15
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
@@ -23,7 +23,7 @@ public static void asyncCounterUsage(Meter meter) {
2323
.counterBuilder("fully.qualified.counter")
2424
.setDescription("A count of produced widgets")
2525
.setUnit("{widget}")
26-
// optionally change the type to double
26+
// Uncomment to optionally change the type to double
2727
// .ofDoubles()
2828
.buildWithCallback(
2929
// the callback is invoked a MetricReader reads metrics

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void asyncGaugeUsage(Meter meter) {
2222
.gaugeBuilder("fully.qualified.gauge")
2323
.setDescription("The current temperature of the widget processing line")
2424
.setUnit("K")
25-
// optionally change the type to long
25+
// Uncomment to optionally change the type to long
2626
// .ofLongs()
2727
.buildWithCallback(
2828
// the callback is invoked a MetricReader reads metrics

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static void asyncUpDownCounterUsage(Meter meter) {
2222
.upDownCounterBuilder("fully.qualified.updowncounter")
2323
.setDescription("Current length of widget processing queue")
2424
.setUnit("{widget}")
25-
// optionally change the type to double
25+
// Uncomment to optionally change the type to double
2626
// .ofDoubles()
2727
.buildWithCallback(
2828
// the callback is invoked a MetricReader reads metrics

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void attributesUsage() {
3636
.put(SHOP_NAME, "opentelemetry-demo")
3737
.put(CUSTOMER_ID, 123)
3838
.put(CUSTOMER_NAME, "Jack")
39-
// optionally initialize attribute keys on the fly
39+
// Optionally initialize attribute keys on the fly
4040
.put(AttributeKey.stringKey("com.acme.string-key"), "value")
4141
.put(AttributeKey.booleanKey("com.acme.bool-key"), true)
4242
.put(AttributeKey.longKey("com.acme.long-key"), 1L)
@@ -45,7 +45,7 @@ public static void attributesUsage() {
4545
.put(AttributeKey.booleanArrayKey("come.acme.bool-array-key"), true, false)
4646
.put(AttributeKey.longArrayKey("come.acme.long-array-key"), 1L, 2L)
4747
.put(AttributeKey.doubleArrayKey("come.acme.double-array-key"), 1.1, 2.2)
48-
// optionally omit initializing AttributeKey
48+
// Optionally omit initializing AttributeKey
4949
.put("com.acme.string-key", "value")
5050
.put("com.acme.bool-key", true)
5151
.put("come.acme.long-key", 1L)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void baggageUsage() {
2828
.put("shopId", "abc123")
2929
.put("shopName", "opentelemetry-demo", BaggageEntryMetadata.create("metadata"))
3030
.build();
31-
// ...or start from empty
31+
// ...or uncomment to start from empty
3232
// newBaggage = Baggage.empty().toBuilder().put("shopId", "abc123").build();
3333
// output => new baggage: {shopId=abc123(), shopName=opentelemetry-demo(metadata)}
3434
System.out.println("new baggage: " + asString(newBaggage));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void gaugeUsage(Meter meter) {
2121
.gaugeBuilder("fully.qualified.gauge")
2222
.setDescription("The current temperature of the widget processing line")
2323
.setUnit("K")
24-
// optionally change the type to long
24+
// Uncomment to optionally change the type to long
2525
// .ofLongs()
2626
.build();
2727

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public static void histogramUsage(Meter meter) {
2020
.histogramBuilder("fully.qualified.histogram")
2121
.setDescription("Length of time to process a widget")
2222
.setUnit("s")
23-
// optionally provide advice on useful default explicit bucket boundaries
23+
// Uncomment to optionally provide advice on useful default explicit bucket boundaries
2424
// .setExplicitBucketBoundariesAdvice(Arrays.asList(1.0, 2.0, 3.0))
25-
// optionally change the type to long
25+
// Uncomment to optionally change the type to long
2626
// .ofLongs()
2727
.build();
2828

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public static void logRecordUsage(Logger logger) {
5454
.setAttribute(
5555
AttributeKey.doubleArrayKey("come.acme.double-array-key"), Arrays.asList(1.1, 2.2))
5656
.setAllAttributes(WIDGET_RED_CIRCLE)
57-
// Optionally explicitly set the context used to correlate with spans. If omitted,
57+
// Uncomment to optionally explicitly set the context used to correlate with spans. If
58+
// omitted,
5859
// Context.current() is used.
5960
// .setContext(context)
6061
// Emit the log record

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
public class SemanticAttributesUsage {
99
public static void semanticAttributesUsage() {
10-
// Semantic attributes are organized by top level domain and whether they are stable or
10+
// Semantic attributes are organized by top-level domain and whether they are stable or
1111
// incubating.
1212
// For example:
1313
// - stable attributes starting with http.* are in the HttpAttributes class.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,17 @@ public static void spanUsage(Tracer tracer) {
3636
AttributeKey.longArrayKey("come.acme.long-array-key"), Arrays.asList(1L, 2L))
3737
.setAttribute(
3838
AttributeKey.doubleArrayKey("come.acme.double-array-key"), Arrays.asList(1.1, 2.2))
39-
// optionally omit initializing AttributeKey
39+
// Optionally omit initializing AttributeKey
4040
.setAttribute("com.acme.string-key", "value")
4141
.setAttribute("com.acme.bool-key", true)
4242
.setAttribute("come.acme.long-key", 1L)
4343
.setAttribute("come.acme.double-key", 1.1)
4444
.setAllAttributes(WIDGET_RED_CIRCLE)
45-
// Optionally explicitly set the parent span context. If omitted, the span's parent will
45+
// Uncomment to optionally explicitly set the parent span context. If omitted, the
46+
// span's parent will
4647
// be set using Context.current()
4748
// .setParent(parentContext)
48-
// Optionally add links
49+
// Uncomment to optionally add links
4950
// .addLink(linkContext, linkAttributes)
5051
// Start the span
5152
.startSpan();

0 commit comments

Comments
 (0)