open-telemetry / opentelemetry-rust-contrib

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

feat: Add host.id resource detector #57

Closed alvarocabanas closed 3 months ago

alvarocabanas commented 4 months ago

Changes

Add the Host Resource detector retrieving the "host.id" as defined in: https://opentelemetry.io/docs/specs/semconv/resource/host/

Defined in #56

Merge requirement checklist

Co-authored-by: rogercoll rogercoll@users.noreply.github.com

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

The slackdriver build is unrelated to this PR changes - @djc if you know what could be causing this:

error[E0308]: `?` operator has incompatible types
   --> opentelemetry-stackdriver/src/lib.rs:417:28
    |
417 |             authenticator: authenticator.build().await?,
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `HttpsConnector<HttpConnector>`, found a different `HttpsConnector<HttpConnector>`
    |
    = note: `?` operator cannot convert from `Authenticator<yup_oauth2::hyper_rustls::HttpsConnector<HttpConnector>>` to `Authenticator<hyper_rustls::HttpsConnector<HttpConnector>>`
    = note: `HttpsConnector<HttpConnector>` and `HttpsConnector<HttpConnector>` have similar names, but are actually distinct types
note: `HttpsConnector<HttpConnector>` is defined in crate `hyper_rustls`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-rustls-0.25.0/src/connector.rs:22:1
    |
22  | pub struct HttpsConnector<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `HttpsConnector<HttpConnector>` is defined in crate `hyper_rustls`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-rustls-0.24.2/src/connector.rs:19:1
    |
19  | pub struct HttpsConnector<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `hyper_rustls` are being used?
djc commented 4 months ago

I think that's because yup-oauth2 made a semver-compatibility mistake... I notified the maintainer.

cijothomas commented 3 months ago

@alvarocabanas Can you fix the CI failures, and we are good to merge. Thank you!

cijothomas commented 3 months ago

@alvarocabanas Can you fix the CI failures, and we are good to merge. Thank you!

Ooops.. Sorry! CI failure is not your code !

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 52.3%. Comparing base (749bbbe) to head (4abefd8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #57 +/- ## ======================================= + Coverage 52.0% 52.3% +0.2% ======================================= Files 37 38 +1 Lines 4938 4967 +29 ======================================= + Hits 2569 2598 +29 Misses 2369 2369 ```

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

cijothomas commented 3 months ago

@alvarocabanas one final lint issue and we are good!

alvarocabanas commented 3 months ago

@alvarocabanas one final lint issue and we are good!

Fixed in last commit.

cijothomas commented 3 months ago

@alvarocabanas one final lint issue and we are good!

Fixed in last commit.

looks like one more. I think the precommit.sh can help catch it locally.

alvarocabanas commented 3 months ago

@alvarocabanas one final lint issue and we are good!

Fixed in last commit.

looks like one more. I think the precommit.sh can help catch it locally.

Sure, thanks, now it seems all are fixed.