Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 4e62aac

Browse files
authored
Rename StatsRunner to TagContextExample because it's more about TagContext. (#1156)
1 parent 301bb88 commit 4e62aac

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

examples/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ java_library(
9292
)
9393

9494
java_binary(
95-
name = "StatsRunner",
96-
main_class = "io.opencensus.examples.stats.StatsRunner",
95+
name = "TagContextExample",
96+
main_class = "io.opencensus.examples.tags.TagContextExample",
9797
runtime_deps = [
9898
":opencensus_examples",
9999
],

examples/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ $ mvn package appassembler:assemble
1717
$ bazel build :all
1818
```
1919

20-
## To run "StatsRunner" example use
20+
## To run "TagContextExample" use
2121

2222
### Gradle
2323
```
24-
$ ./build/install/opencensus-examples/bin/StatsRunner
24+
$ ./build/install/opencensus-examples/bin/TagContextExample
2525
```
2626

2727
### Maven
2828
```
29-
$ ./target/appassembler/bin/StatsRunner
29+
$ ./target/appassembler/bin/TagContextExample
3030
```
3131

3232
### Bazel
3333
```
34-
$ ./bazel-bin/StatsRunner
34+
$ ./bazel-bin/TagContextExample
3535
```
3636

3737
## To run "ZPagesTester"

examples/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ apply plugin: 'application'
8484

8585
startScripts.enabled = false
8686

87-
task statsRunner(type: CreateStartScripts) {
88-
mainClassName = 'io.opencensus.examples.stats.StatsRunner'
89-
applicationName = 'StatsRunner'
87+
task tagContextExample(type: CreateStartScripts) {
88+
mainClassName = 'io.opencensus.examples.tags.TagContextExample'
89+
applicationName = 'TagContextExample'
9090
outputDir = new File(project.buildDir, 'tmp')
9191
classpath = jar.outputs.files + project.configurations.runtime
9292
}
@@ -144,7 +144,7 @@ applicationDistribution.into('bin') {
144144
from(multiSpansTracing)
145145
from(multiSpansScopedTracing)
146146
from(multiSpansContextTracing)
147-
from(statsRunner)
147+
from(tagContextExample)
148148
from(zPagesTester)
149149
from(quickStart)
150150
from(helloWorldServer)

examples/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
<configuration>
106106
<programs>
107107
<program>
108-
<id>StatsRunner</id>
109-
<mainClass>io.opencensus.examples.stats.StatsRunner</mainClass>
108+
<id>TagContextExample</id>
109+
<mainClass>io.opencensus.examples.tags.TagContextExample</mainClass>
110110
</program>
111111
<program>
112112
<id>MultiSpansTracing</id>

examples/src/main/java/io/opencensus/examples/stats/StatsRunner.java renamed to examples/src/main/java/io/opencensus/examples/tags/TagContextExample.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package io.opencensus.examples.stats;
17+
package io.opencensus.examples.tags;
1818

1919
import io.opencensus.common.Scope;
2020
import io.opencensus.stats.Measure.MeasureDouble;
@@ -26,8 +26,8 @@
2626
import io.opencensus.tags.Tagger;
2727
import io.opencensus.tags.Tags;
2828

29-
/** Simple program that uses Stats contexts. */
30-
public class StatsRunner {
29+
/** Simple program that uses {@link TagContext}. */
30+
public class TagContextExample {
3131

3232
private static final TagKey K1 = TagKey.create("k1");
3333
private static final TagKey K2 = TagKey.create("k2");
@@ -46,7 +46,7 @@ public class StatsRunner {
4646
private static final Tagger tagger = Tags.getTagger();
4747
private static final StatsRecorder statsRecorder = Stats.getStatsRecorder();
4848

49-
private StatsRunner() {}
49+
private TagContextExample() {}
5050

5151
/**
5252
* Main method.

0 commit comments

Comments
 (0)