./gradlew installDistmvn package appassembler:assemble./build/install/opencensus-examples/bin/TagContextExample./target/appassembler/bin/TagContextExample./build/install/opencensus-examples/bin/ZPagesTester./target/appassembler/bin/ZPagesTesterAvailable 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/QuickStartPlease 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 zPagePortSee the full tutorial on OpenCensus website.
First run:
./build/install/opencensus-examples/bin/Repl./target/appassembler/bin/ReplThen start the Prometheus process:
cd src/main/java/io/opencensus/examples/quickstart/
prometheus --config.file=prometheus.yamlStats 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
HttpJettyServer is a web service using Jetty Server on top of http-servlet.
HttpJettyClient is a web client using Jetty Client that sends request to HttpettyServer.
Both HttpJettyServer and HttpJettyClient are instrumented with OpenCensus.
Traces from both client and server can be viewed in their respective logs on console. Stats are available from Prometheus server running at
- http://localhost:9091/metrics - for client stats
- http://localhost:9090/metrics - for server stats
./build/install/opencensus-examples/bin/HttpJettyServer
./build/install/opencensus-examples/bin/HttpJettyClient./target/appassembler/bin/HttpJettyServer
./target/appassembler/bin/HttpJettyClient