opentelemetry_proto/
lib.rs

1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2//! This crate contains generated files from [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto)
3//! repository and transformation between types from generated files and types defined in [opentelemetry](https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry)
4//!
5//! Based on the build tool needed, users can choose to generate files using [tonic](https://github.com/hyperium/tonic)
6//! or [grpcio](https://github.com/tikv/grpc-rs).
7//!
8//!
9//! # Feature flags
10//! `Opentelemetry-proto` includes a set of feature flags to avoid pull in unnecessary dependencies.
11//! The following is the full list of currently supported features:
12//!
13//! ## Signals
14//! - `trace`: generate types that used in traces. Currently supports `gen-tonic`.
15//! - `metrics`: generate types that used in metrics. Currently supports `gen-tonic`.
16//! - `logs`: generate types that used in logs. Currently supports `gen-tonic`.
17//! - `zpages`: generate types that used in zPages. Currently only tracez related types will be generated. Currently supports `gen-tonic`.
18//!
19//! ## Creates used to generate files
20//! - `gen-tonic-messages`: generate rs files using [tonic](https://github.com/hyperium/tonic) and [prost](https://github.com/tokio-rs/prost).
21//! - `gen-tonic`: adding tonic transport to "`gen-tonic-messages"
22//!
23//! ## Misc
24//! - `full`: enabled all features above.
25//!
26//! By default, no feature is enabled.
27
28// proto mod contains file generated by protobuf or other build tools.
29// we shouldn't manually change it. Thus skip format and lint check.
30#[rustfmt::skip]
31#[allow(warnings)]
32#[doc(hidden)]
33mod proto;
34
35#[cfg(feature = "gen-tonic-messages")]
36pub use proto::tonic;
37
38pub mod transform;