[package]
name = "opentelemetry-proto"
version = "0.1.0"
authors = ["OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>"]
description = "Protobuf generated files and transmationes"
homepage = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-proto"
repository = "https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-proto"
readme = "README.md"
categories = [
    "development-tools::debugging",
    "development-tools::profiling",
    "asynchronous",
]
keywords = ["opentelemetry", "otlp", "logging", "tracing", "metrics"]
license = "Apache-2.0"
edition = "2018"
build = "build.rs"
autotests = false

[lib]
doctest = false

[[test]]
name = "grpc_build"
path = "tests/grpc_build.rs"
required-features = ["with-serde", "gen-protoc"]

[features]
default = []

full = ["gen-tonic", "gen-protoc", "traces", "metrics", "zpages", "build-server", "build-client", "with-serde"]

# crates used to generate rs files
gen-tonic = ["tonic", "tonic-build", "prost"]
gen-protoc = ["grpcio", "protobuf"]

# telemetry pillars and functions
traces = []
metrics = []
zpages = ["traces"]

# add ons
with-serde = ["protobuf/with-serde", "serde", "serde_json"]
build-server = []
build-client = []

[dependencies]
grpcio = { version = "0.9", optional = true }
tonic = { version = "0.6.2", optional = true }
prost = { version = "0.9", optional = true }
protobuf = { version = "2.18", optional = true }
opentelemetry = { version = "0.17", default-features = false, features = ["trace", "metrics"], path = "../opentelemetry" }
futures = { version = "0.3", default-features = false, features = ["std"] }
futures-util = { version = "0.3", default-features = false, features = ["std"] }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }

[dev-dependencies]
protobuf-codegen = { version = "2.16" }
protoc-grpcio = { version = "3.0" }

[build-dependencies]
tonic-build = { version = "0.6.2", optional = true }
prost-build = { version = "0.9", optional = true }
