OpenTelemetry support for Google Cloud Trace
Quick start
Cargo.toml:
[]
= "0.8"
Compatibility matrix
| opentelemetry-gcloud-trace version | opentelemetry version | tracing-opentelemetry | gcloud-sdk |
|---|---|---|---|
| 0.8 | 0.21 | 0.22 | 0.23 |
| 0.7 | 0.20 | 0.21 | 0.21 |
| 0.6 | 0.20 | 0.20 | 0.20 |
| 0.5 | 0.19 | 0.19 | 0.20 |
| 0.4 | 0.18 | 0.18 | 0.19 |
Example:
use *;
use *;
let tracer = for_default_project_id.await? // or GcpCloudTraceExporterBuilder::new(config_env_var("PROJECT_ID")?)
.install
.await?;
tracer.in_span;
This is a basic configuration, not recommended for prod systems. See the Performance section for prod config.
All examples available at examples directory.
To run example use with environment variables:
# PROJECT_ID=<your-google-project-id> cargo run --example enable-exporter

[]
= { = "*", = [] }
= { = "*", = ["rt-tokio"] }
= "*"
Configuration
You can specify trace configuration using with_trace_config:
new.with_trace_config
Limitations
- This exporter doesn't support any other runtimes except Tokio.
Licence
Apache Software License (ASL)
Author
Abdulla Abdurakhmanov