open-telemetry / opentelemetry-rust-contrib

OpenTelemetry Contrib Packages for Rust
Apache License 2.0
35 stars 34 forks source link

Fix some deprecated api calls and clippy reports #74

Closed funArash closed 4 months ago

funArash commented 4 months ago

Fixes # Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

linux-foundation-easycla[bot] commented 4 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

lalitb commented 4 months ago

Can you also remove the exclusion of this project from Cargo.toml, so the build can be verified.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.3%. Comparing base (56a6f45) to head (ac64f19). Report is 8 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #74 +/- ## ======================================= + Coverage 52.3% 53.3% +1.0% ======================================= Files 38 38 Lines 4967 5026 +59 ======================================= + Hits 2598 2680 +82 + Misses 2369 2346 -23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lalitb commented 4 months ago

@funArash - There are some errors in CI build for Datadog if you can fix in this PR. Thanks.

 Documenting opentelemetry-datadog v0.10.0 (/home/runner/work/opentelemetry-rust-contrib/opentelemetry-rust-contrib/opentelemetry-datadog)
error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:162:21
    |
162 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `-D unexpected-cfgs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:168:17
    |
168 |                 feature = "surf-client"
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:172:21
    |
172 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: could not document `opentelemetry-datadog`
funArash commented 4 months ago

@funArash - There are some errors in CI build for Datadog if you can fix in this PR. Thanks.

 Documenting opentelemetry-datadog v0.10.0 (/home/runner/work/opentelemetry-rust-contrib/opentelemetry-rust-contrib/opentelemetry-datadog)
error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:162:21
    |
162 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `-D unexpected-cfgs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:168:17
    |
168 |                 feature = "surf-client"
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:172:21
    |
172 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: could not document `opentelemetry-datadog`

I cannot repo the errors locally.. am I missing something?

export CARGO_INCREMENTAL=0    
export RUSTDOCFLAGS=-Dwarnings

cargo doc --all-features --no-deps
funArash commented 4 months ago

found it.. cargo +nightly doc --all-features --no-deps reproed the errors