aboutsummaryrefslogtreecommitdiffstats
path: root/examples/src
diff options
context:
space:
mode:
authorKristen Kozak <sebright@google.com>2017-09-13 15:33:12 -0700
committerKristen Kozak <sebright@google.com>2017-09-13 15:36:55 -0700
commiteb7905672410338d4fdd0910bd3733695064c4c6 (patch)
tree8e6421f758d4715f9d4fc72570083ed57f8e9961 /examples/src
parentc82910ac0b04ceba7396887b6e044cf878a46f31 (diff)
downloadplatform_external_opencensus-java-eb7905672410338d4fdd0910bd3733695064c4c6.tar.gz
platform_external_opencensus-java-eb7905672410338d4fdd0910bd3733695064c4c6.tar.bz2
platform_external_opencensus-java-eb7905672410338d4fdd0910bd3733695064c4c6.zip
Rename TagContextBuilder.set methods to "put".
"put" is a more descriptive name, since these methods behave like Map.put. The name is also more consistent with Span.putAttribute.
Diffstat (limited to 'examples/src')
-rw-r--r--examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java b/examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java
index 95fff962..5c231b57 100644
--- a/examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java
+++ b/examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java
@@ -56,12 +56,12 @@ public class StatsRunner {
System.out.println("Hello Stats World");
System.out.println("Default Tags: " + tagContexts.empty());
System.out.println("Current Tags: " + tagContexts.getCurrentTagContext());
- TagContext tags1 = tagContexts.emptyBuilder().set(K1, V1).set(K2, V2).build();
+ TagContext tags1 = tagContexts.emptyBuilder().put(K1, V1).put(K2, V2).build();
try (Scope scopedTagCtx1 = tagContexts.withTagContext(tags1)) {
System.out.println(" Current Tags: " + tagContexts.getCurrentTagContext());
System.out.println(
" Current == Default + tags1: " + tagContexts.getCurrentTagContext().equals(tags1));
- TagContext tags2 = tagContexts.toBuilder(tags1).set(K3, V3).set(K4, V4).build();
+ TagContext tags2 = tagContexts.toBuilder(tags1).put(K3, V3).put(K4, V4).build();
try (Scope scopedTagCtx2 = tagContexts.withTagContext(tags2)) {
System.out.println(" Current Tags: " + tagContexts.getCurrentTagContext());
System.out.println(