|
1 | 1 | # OpenCensus .NET SDK - distributed tracing and stats collection framework |
2 | 2 |
|
3 | 3 | [![Gitter chat][gitter-image]][gitter-url] |
| 4 | + |
4 | 5 | MyGet: [![MyGet Nightly][opencensus-myget-image]][opencensus-myget-url] |
5 | 6 |
|
6 | | -OpenCensus is a toolkit for collecting application performance and behavior data. It currently |
7 | | -includes 3 APIs: stats, tracing and tags. |
| 7 | +OpenCensus is a toolkit for collecting application performance and behavior |
| 8 | +data. It currently includes 3 APIs: stats, tracing and tags. |
8 | 9 |
|
9 | | -The library is in [Beta](#versioning) stage and APIs are expected to be mostly stable. The |
10 | | -library is expected to move to [GA](#versioning) stage after v1.0.0 major release. |
| 10 | +The library is in [Beta](#versioning) stage and APIs are expected to be mostly |
| 11 | +stable. The library is expected to move to [GA](#versioning) stage after v1.0.0 |
| 12 | +major release. |
11 | 13 |
|
12 | | -Please join [gitter](https://gitter.im/census-instrumentation/Lobby) for help or feedback on this |
13 | | -project. |
| 14 | +Please join [gitter](https://gitter.im/census-instrumentation/Lobby) for help |
| 15 | +or feedback on this project. |
14 | 16 |
|
15 | | -We encourage contributions. Use tags [up-for-grabs](https://github.com/census-instrumentation/opencensus-csharp/issues?q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs) and [good first issue](https://github.com/census-instrumentation/opencensus-csharp/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to get started with the project. Follow [CONTRIBUTING](CONTRIBUTING.md) guide to report issues or submit a proposal. |
| 17 | +We encourage contributions. Use tags |
| 18 | +[up-for-grabs](https://github.com/census-instrumentation/opencensus-csharp/issues?q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs) |
| 19 | +and [good first |
| 20 | +issue](https://github.com/census-instrumentation/opencensus-csharp/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) |
| 21 | +to get started with the project. Follow [CONTRIBUTING](CONTRIBUTING.md) guide |
| 22 | +to report issues or submit a proposal. |
16 | 23 |
|
17 | 24 | ## OpenCensus Quickstart |
18 | 25 |
|
19 | | -TBD |
| 26 | +### Using Zipkin exporter |
| 27 | + |
| 28 | +Configure Zipkin exporter to see traces in Zipkin UI. |
| 29 | + |
| 30 | +1. Get Zipkin using getting [started |
| 31 | + guide](https://zipkin.io/pages/quickstart.html). |
| 32 | +2. Start `ZipkinTraceExporter` as below: |
| 33 | + |
| 34 | +``` csharp |
| 35 | +var exporter = new ZipkinTraceExporter( |
| 36 | + new ZipkinTraceExporterOptions() { |
| 37 | + Endpoint = "https://<zipkin-server:9411>/api/v2/spans", |
| 38 | + ServiceName = typeof(Program).Assembly.GetName().Name, |
| 39 | + }, |
| 40 | + Tracing.ExportComponent); |
| 41 | +exporter.Start(); |
| 42 | + |
| 43 | +var span = tracer.SpanBuilder("incoming request").SetSampler(Samplers.AlwaysSample).StartSpan(); |
| 44 | +Thread.Sleep(TimeSpan.FromSeconds(1)); |
| 45 | +span.End(); |
| 46 | +``` |
20 | 47 |
|
21 | 48 | ## Versioning |
22 | 49 |
|
23 | 50 | This library follows [Semantic Versioning][semver]. |
24 | 51 |
|
25 | | -**GA**: Libraries defined at a GA quality level are stable, and will not introduce |
26 | | -backwards-incompatible changes in any minor or patch releases. We will address issues and requests |
27 | | -with the highest priority. If we were to make a backwards-incompatible changes on an API, we will |
28 | | -first mark the existing API as deprecated and keep it for 18 months before removing it. |
| 52 | +**GA**: Libraries defined at a GA quality level are stable, and will not |
| 53 | +introduce backwards-incompatible changes in any minor or patch releases. We |
| 54 | +will address issues and requests with the highest priority. If we were to make |
| 55 | +a backwards-incompatible changes on an API, we will first mark the existing API |
| 56 | +as deprecated and keep it for 18 months before removing it. |
29 | 57 |
|
30 | | -**Beta**: Libraries defined at a Beta quality level are expected to be mostly stable and we're |
31 | | -working towards their release candidate. We will address issues and requests with a higher priority. |
32 | | -There may be backwards incompatible changes in a minor version release, though not in a patch |
33 | | -release. If an element is part of an API that is only meant to be used by exporters or other |
34 | | -opencensus libraries, then there is no deprecation period. Otherwise, we will deprecate it for 18 |
35 | | -months before removing it, if possible. |
36 | | - |
| 58 | +**Beta**: Libraries defined at a Beta quality level are expected to be mostly |
| 59 | +stable and we're working towards their release candidate. We will address |
| 60 | +issues and requests with a higher priority. There may be backwards incompatible |
| 61 | +changes in a minor version release, though not in a patch release. If an |
| 62 | +element is part of an API that is only meant to be used by exporters or other |
| 63 | +opencensus libraries, then there is no deprecation period. Otherwise, we will |
| 64 | +deprecate it for 18 months before removing it, if possible. |
37 | 65 |
|
38 | 66 | [gitter-image]: https://badges.gitter.im/census-instrumentation/lobby.svg |
39 | | -[gitter-url]: https://gitter.im/census-instrumentation/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge |
40 | | -[opencensus-myget-image]: https://img.shields.io/myget/opencensus/vpre/OpenCensus.svg |
41 | | -[opencensus-myget-url]: https://www.myget.org/feed/opencensus/package/nuget/OpenCensus |
42 | | -[semver]: http://semver.org/ |
| 67 | +[gitter-url]: |
| 68 | +https://gitter.im/census-instrumentation/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge |
| 69 | +[opencensus-myget-image]: |
| 70 | +https://img.shields.io/myget/opencensus/vpre/OpenCensus.svg |
| 71 | +[opencensus-myget-url]: |
| 72 | +https://www.myget.org/feed/opencensus/package/nuget/OpenCensus [semver]: |
| 73 | +http://semver.org/ |
0 commit comments