Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
build.gradle | 22-Oct-2020 | 374 | |
README.md | 22-Oct-2020 | 3.3K | |
screenshots/ | 22-Oct-2020 | ||
src/ | 22-Oct-2020 |
1 # OpenCensus Z-Pages 2 [![Build Status][travis-image]][travis-url] 3 [![Windows Build Status][appveyor-image]][appveyor-url] 4 [![Maven Central][maven-image]][maven-url] 5 6 The *OpenCensus Z-Pages for Java* is a collection of HTML pages to display stats and trace data and 7 allows library configuration control. 8 9 ## Quickstart 10 11 ### Add the dependencies to your project 12 13 For Maven add to your `pom.xml`: 14 ```xml 15 <dependencies> 16 <dependency> 17 <groupId>io.opencensus</groupId> 18 <artifactId>opencensus-api</artifactId> 19 <version>0.16.1</version> 20 </dependency> 21 <dependency> 22 <groupId>io.opencensus</groupId> 23 <artifactId>opencensus-contrib-zpages</artifactId> 24 <version>0.16.1</version> 25 </dependency> 26 <dependency> 27 <groupId>io.opencensus</groupId> 28 <artifactId>opencensus-impl</artifactId> 29 <version>0.16.1</version> 30 <scope>runtime</scope> 31 </dependency> 32 </dependencies> 33 ``` 34 35 For Gradle add to your dependencies: 36 ```gradle 37 compile 'io.opencensus:opencensus-api:0.16.1' 38 compile 'io.opencensus:opencensus-contrib-zpages:0.16.1' 39 runtime 'io.opencensus:opencensus-impl:0.16.1' 40 ``` 41 42 ### Register the Z-Pages 43 44 ```java 45 public class MyMainClass { 46 public static void main(String[] args) throws Exception { 47 ZPageHandlers.startHttpServerAndRegisterAll(8080); 48 // ... do work 49 } 50 } 51 ``` 52 53 ### View stats and spans on Z-Pages 54 55 #### View RPC stats on /rpcz page 56 57 The /rpcz page displays the canonical gRPC cumulative and interval stats broken down by RPC methods. 58 Example: 59 60  61 62 #### View measures and stats for all exported views on /statsz page 63 64 The /statsz page displays measures and stats for all exported views. Views are grouped into directories 65 according to their namespace. Example: 66 67  68  69 70 #### View trace spans on /tracez page 71 72 The /tracez page displays information about all active spans and all sampled spans based on latency 73 and errors. Example: 74 75  76 77 #### View and update tracing configuration on /traceconfigz page 78 79 The /traceconfigz page displays information about the current active tracing configuration and 80 allows users to change it. Example: 81 82  83 84 85 ### FAQ 86 87 #### Why do I not see sampled spans based on latency and error codes for a given span name? 88 Sampled spans based on latency and error codes are available only for registered span names. 89 For more details see [SampledSpanStore][sampledspanstore-url]. 90 91 [travis-image]: https://travis-ci.org/census-instrumentation/opencensus-java.svg?branch=master 92 [travis-url]: https://travis-ci.org/census-instrumentation/opencensus-java 93 [appveyor-image]: https://ci.appveyor.com/api/projects/status/hxthmpkxar4jq4be/branch/master?svg=true 94 [appveyor-url]: https://ci.appveyor.com/project/opencensusjavateam/opencensus-java/branch/master 95 [maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-contrib-zpages/badge.svg 96 [maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opencensus/opencensus-contrib-zpages 97 [sampledspanstore-url]: https://github.com/census-instrumentation/opencensus-java/blob/master/api/src/main/java/io/opencensus/trace/export/SampledSpanStore.java 98