Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot infer type for type parameter #852

Open
thanhdatvo opened this issue Jul 27, 2020 · 1 comment
Open

cannot infer type for type parameter #852

thanhdatvo opened this issue Jul 27, 2020 · 1 comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.

Comments

@thanhdatvo
Copy link

thanhdatvo commented Jul 27, 2020

Bug Report

Version

opentelemetry = "0.6.0"
tracing-opentelemetry = "0.5.0"

Platform

Crates

Description

I tried this code:

let telemetry = tracing_opentelemetry::layer().with_tracer(tracer);

I expected to see this happen:
No error
Instead, this happened:
Screen Shot 2020-07-27 at 10 31 12

@hawkw hawkw added the crate/opentelemetry Related to the `tracing-opentelemetry` crate. label Jul 27, 2020
@davidbarsky
Copy link
Member

Can you add some additional code and context around this? In this case, S is a subscriber/underlying storage system for the OpenTelemetry Layer, which, idiomatically, is inferred to be a tracing_subscriber::registry::Registry. Few questions:

  1. Do you have something like this code in scope of telemetry? That should force rustc to infer S correctly.
  2. More generally, why is this code inside of an async block? The async block might not be needed.

hawkw pushed a commit that referenced this issue Aug 15, 2022
`tracing-subscriber` has been on `0.3` for almost a year now.

I naively copied the versions from the README, and when trying to use
the library with the current versions of e.g. `tracing-opentelemetry`, I
ran into the same error message as seen in this issue:
#852

Co-authored-by: Bryan Garza <[email protected]>
davidbarsky pushed a commit that referenced this issue Sep 8, 2022
`tracing-subscriber` has been on `0.3` for almost a year now.

I naively copied the versions from the README, and when trying to use
the library with the current versions of e.g. `tracing-opentelemetry`, I
ran into the same error message as seen in this issue:
#852

Co-authored-by: Bryan Garza <[email protected]>
hawkw pushed a commit that referenced this issue Sep 19, 2022
`tracing-subscriber` has been on `0.3` for almost a year now.

I naively copied the versions from the README, and when trying to use
the library with the current versions of e.g. `tracing-opentelemetry`, I
ran into the same error message as seen in this issue:
#852

Co-authored-by: Bryan Garza <[email protected]>
liuhaozhan added a commit to liuhaozhan/tracing that referenced this issue Nov 17, 2022
`tracing-subscriber` has been on `0.3` for almost a year now.

I naively copied the versions from the README, and when trying to use
the library with the current versions of e.g. `tracing-opentelemetry`, I
ran into the same error message as seen in this issue:
tokio-rs/tracing#852

Co-authored-by: Bryan Garza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.
Projects
None yet
Development

No branches or pull requests

3 participants