Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lightstep/lightstep-census-java
Java exporter for OpenCensus
https://github.com/lightstep/lightstep-census-java
opencensus
Last synced: 8 days ago
JSON representation
Java exporter for OpenCensus
- Host: GitHub
- URL: https://github.com/lightstep/lightstep-census-java
- Owner: lightstep
- License: apache-2.0
- Created: 2018-10-15T14:33:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-14T03:42:25.000Z (about 4 years ago)
- Last Synced: 2024-08-04T14:12:14.576Z (3 months ago)
- Topics: opencensus
- Language: Java
- Homepage: https://lightstep.com
- Size: 37.1 KB
- Stars: 0
- Watchers: 72
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Circle CI](https://circleci.com/gh/lightstep/lightstep-census-java.svg?style=shield)](https://circleci.com/gh/lightstep/lightstep-census-java) [![Released Version][maven-img]][maven] [![Apache-2.0 license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
# LightStep OpenCensus Trace Exporter
The LightStep OpenCensus Trace Exporter is a trace exporter that exports data to LightStep.
## Installation
pom.xml
```xmlcom.lightstep.opencensus
lightstep-opencensus-exporter
VERSIONio.opencensus
opencensus-impl
0.19.0
runtime```
Also add dependencies required for LightStep tracer
## Usage
### Initialization
```java
// Instantiate LightStep tracer
JRETracer jreTracer = ...// Register the exporter
LightStepTraceExporter.createAndRegister(jreTracer);// Optionally configure 100% sample rate, otherwise, few traces will be sampled
TraceConfig traceConfig = Tracing.getTraceConfig();
traceConfig.updateActiveTraceParams(
traceConfig.getActiveTraceParams()
.toBuilder()
.setSampler(Samplers.probabilitySampler(1))
.build());
```### Shutdown
```java
// To shutdown the exporter
Tracing.getExportComponent().shutdown();// Close the tracer, so that it'll flush queued traces
jreTracer.close();
```### Example
There is an [example](./example) which demonstrate basic usage of the exporter.
## License
[Apache 2.0 License](./LICENSE).
[maven-img]: https://img.shields.io/maven-central/v/com.lightstep.opencensus/lightstep-opencensus-exporter.svg
[maven]: http://search.maven.org/#search%7Cga%7C1%7Clightstep-opencensus-exporter