diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96d9cc285b..3a7c891c42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: external-types: strategy: matrix: - example: [opentelemetry, opentelemetry-sdk] + example: [opentelemetry, opentelemetry-sdk, opentelemetry-otlp, opentelemetry-zipkin] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/opentelemetry-otlp/allowed-external-types.toml b/opentelemetry-otlp/allowed-external-types.toml new file mode 100644 index 0000000000..2412d22715 --- /dev/null +++ b/opentelemetry-otlp/allowed-external-types.toml @@ -0,0 +1,22 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# This is used with cargo-check-external-types to reduce the surface area of downstream crates from +# the public API. Ideally this can have a few exceptions as possible. +allowed_external_types = [ + "opentelemetry::*", + "opentelemetry_http::*", + "opentelemetry_sdk::*", + # http is a pre 1.0 crate + "http::uri::InvalidUri", + "http::header::name::InvalidHeaderName", + "http::header::value::InvalidHeaderValue", + # prost is a pre 1.0 crate + "prost::error::EncodeError", + # tonic is a pre 1.0 crate + "tonic::status::Code", + "tonic::status::Status", + "tonic::metadata::map::MetadataMap", + "tonic::transport::channel::Channel", + "tonic::transport::error::Error", + "tonic::service::interceptor::Interceptor", +] diff --git a/opentelemetry-zipkin/allowed-external-types.toml b/opentelemetry-zipkin/allowed-external-types.toml new file mode 100644 index 0000000000..d27d242006 --- /dev/null +++ b/opentelemetry-zipkin/allowed-external-types.toml @@ -0,0 +1,12 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# This is used with cargo-check-external-types to reduce the surface area of downstream crates from +# the public API. Ideally this can have a few exceptions as possible. +allowed_external_types = [ + "opentelemetry::*", + "opentelemetry_http::*", + "opentelemetry_sdk::*", + # http is a pre 1.0 crate + "http::error::Error", + "http::uri::InvalidUri", +]