$ ./gradlew installDist
$ mvn package appassembler:assemble
$ bazel build :all
$ ./build/install/opencensus-examples/bin/TagContextExample
$ ./target/appassembler/bin/TagContextExample
$ ./bazel-bin/TagContextExample
$ ./build/install/opencensus-examples/bin/ZPagesTester
$ ./target/appassembler/bin/ZPagesTester
$ ./bazel-bin/ZPagesTester
Available pages:
- For tracing page go to localhost:8080/tracez.
- For tracing config page go to localhost:8080/traceconfigz.
- For RPC stats page go to localhost:8080/rpcz.
- For stats and measures on all registered views go to localhost:8080/statsz.
$ ./build/install/opencensus-examples/bin/QuickStart
$ ./target/appassembler/bin/QuickStart
$ ./bazel-bin/QuickStart
Please note all the arguments are optional. If you do not specify these arguments, default values will be used:
- host and serverPort will be "localhost:50051"
- user will be "world"
- cloudProjectId will be null (which means no stats/spans will be exported to Stackdriver)
- server zPagePort will be 3000
- client zPagePort will be 3001
- Prometheus port will be 9090
However, if you want to specify any of these arguements, please make sure they are in order.
$ ./build/install/opencensus-examples/bin/HelloWorldServer serverPort cloudProjectId zPagePort prometheusPort
$ ./build/install/opencensus-examples/bin/HelloWorldClient user host serverPort cloudProjectId zPagePort
$ ./target/appassembler/bin/HelloWorldServer serverPort cloudProjectId zPagePort prometheusPort
$ ./target/appassembler/bin/HelloWorldClient user host serverPort cloudProjectId zPagePort
$ ./bazel-bin/HelloWorldServer serverPort cloudProjectId zPagePort prometheusPort
$ ./bazel-bin/HelloWorldClient user host serverPort cloudProjectId zPagePort
See the full tutorial on OpenCensus website.
First run:
$ ./build/install/opencensus-examples/bin/Repl
$ ./target/appassembler/bin/Repl
$ ./bazel-bin/Repl
Then start the Prometheus process:
$ cd src/main/java/io/opencensus/examples/quickstart/
$ prometheus --config.file=prometheus.yaml
Stats will be shown on Prometheus UI on http://localhost:9090.
See the full tutorial on OpenCensus website.
$ ./build/install/opencensus-examples/bin/StackdriverQuickstart
$ ./target/appassembler/bin/StackdriverQuickstart
$ ./bazel-bin/StackdriverQuickstart