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

no associated item named GRPC_STATUS found for struct tonic::Status #2165

Closed
ymgyt opened this issue Oct 2, 2024 · 8 comments · Fixed by #2168
Closed

no associated item named GRPC_STATUS found for struct tonic::Status #2165

ymgyt opened this issue Oct 2, 2024 · 8 comments · Fixed by #2168
Assignees
Labels
enhancement New feature or request triage:todo Needs to be traiged.

Comments

@ymgyt
Copy link
Contributor

ymgyt commented Oct 2, 2024

Related Problems?

No response

Describe the solution you'd like:

The compilation succeeds.

Considered Alternatives

No response

Additional Context

I would like to report a compilation failure with opentelemetry-proto-0.26.0.

cargo check --all-features
    Checking opentelemetry-proto v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry-proto)
error[E0599]: no associated item named `GRPC_STATUS` found for struct `tonic::Status` in the current scope
   --> opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.logs.v1.rs:343:48
    |
343 | ...                   tonic::Status::GRPC_STATUS,
    |                                      ^^^^^^^^^^^ associated item not found in `Status`

error[E0599]: no associated item named `GRPC_STATUS` found for struct `tonic::Status` in the current scope
   --> opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.metrics.v1.rs:343:48
    |
343 | ...                   tonic::Status::GRPC_STATUS,
    |                                      ^^^^^^^^^^^ associated item not found in `Status`

error[E0599]: no associated item named `GRPC_STATUS` found for struct `tonic::Status` in the current scope
   --> opentelemetry-proto/src/proto/tonic/opentelemetry.proto.collector.trace.v1.rs:343:48
    |
343 | ...                   tonic::Status::GRPC_STATUS,
    |                                      ^^^^^^^^^^^ associated item not found in `Status`
`cargo tree` output

opentelemetry-proto v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry-proto)
├── hex v0.4.3
├── opentelemetry v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry)
│   ├── futures-core v0.3.30
│   ├── futures-sink v0.3.30
│   ├── once_cell v1.19.0
│   ├── pin-project-lite v0.2.14
│   └── thiserror v1.0.63
│       └── thiserror-impl v1.0.63 (proc-macro)
│           ├── proc-macro2 v1.0.86
│           │   └── unicode-ident v1.0.13
│           ├── quote v1.0.37
│           │   └── proc-macro2 v1.0.86 (*)
│           └── syn v2.0.77
│               ├── proc-macro2 v1.0.86 (*)
│               ├── quote v1.0.37 (*)
│               └── unicode-ident v1.0.13
├── opentelemetry_sdk v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry-sdk)
│   ├── async-trait v0.1.82 (proc-macro)
│   │   ├── proc-macro2 v1.0.86 (*)
│   │   ├── quote v1.0.37 (*)
│   │   └── syn v2.0.77 (*)
│   ├── futures-channel v0.3.30
│   │   └── futures-core v0.3.30
│   ├── futures-executor v0.3.30
│   │   ├── futures-core v0.3.30
│   │   ├── futures-task v0.3.30
│   │   └── futures-util v0.3.30
│   │       ├── futures-core v0.3.30
│   │       ├── futures-macro v0.3.30 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.86 (*)
│   │       │   ├── quote v1.0.37 (*)
│   │       │   └── syn v2.0.77 (*)
│   │       ├── futures-sink v0.3.30
│   │       ├── futures-task v0.3.30
│   │       ├── pin-project-lite v0.2.14
│   │       ├── pin-utils v0.1.0
│   │       └── slab v0.4.9
│   │           [build-dependencies]
│   │           └── autocfg v1.3.0
│   ├── futures-util v0.3.30 (*)
│   ├── glob v0.3.1
│   ├── once_cell v1.19.0
│   ├── opentelemetry v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry) (*)
│   ├── percent-encoding v2.3.1
│   ├── rand v0.8.5
│   │   ├── libc v0.2.158
│   │   ├── rand_chacha v0.3.1
│   │   │   ├── ppv-lite86 v0.2.20
│   │   │   │   └── zerocopy v0.7.35
│   │   │   │       ├── byteorder v1.5.0
│   │   │   │       └── zerocopy-derive v0.7.35 (proc-macro)
│   │   │   │           ├── proc-macro2 v1.0.86 (*)
│   │   │   │           ├── quote v1.0.37 (*)
│   │   │   │           └── syn v2.0.77 (*)
│   │   │   └── rand_core v0.6.4
│   │   │       └── getrandom v0.2.15
│   │   │           ├── cfg-if v1.0.0
│   │   │           └── libc v0.2.158
│   │   └── rand_core v0.6.4 (*)
│   ├── serde_json v1.0.128
│   │   ├── itoa v1.0.11
│   │   ├── memchr v2.7.4
│   │   ├── ryu v1.0.18
│   │   └── serde v1.0.210
│   │       └── serde_derive v1.0.210 (proc-macro)
│   │           ├── proc-macro2 v1.0.86 (*)
│   │           ├── quote v1.0.37 (*)
│   │           └── syn v2.0.77 (*)
│   └── thiserror v1.0.63 (*)
├── prost v0.13.2
│   ├── bytes v1.7.2
│   └── prost-derive v0.13.2 (proc-macro)
│       ├── anyhow v1.0.89
│       ├── itertools v0.13.0
│       │   └── either v1.13.0
│       ├── proc-macro2 v1.0.86 (*)
│       ├── quote v1.0.37 (*)
│       └── syn v2.0.77 (*)
├── serde v1.0.210 (*)
└── tonic v0.12.2
    ├── async-stream v0.3.5
    │   ├── async-stream-impl v0.3.5 (proc-macro)
    │   │   ├── proc-macro2 v1.0.86 (*)
    │   │   ├── quote v1.0.37 (*)
    │   │   └── syn v2.0.77 (*)
    │   ├── futures-core v0.3.30
    │   └── pin-project-lite v0.2.14
    ├── async-trait v0.1.82 (proc-macro) (*)
    ├── axum v0.7.5
    │   ├── async-trait v0.1.82 (proc-macro) (*)
    │   ├── axum-core v0.4.3
    │   │   ├── async-trait v0.1.82 (proc-macro) (*)
    │   │   ├── bytes v1.7.2
    │   │   ├── futures-util v0.3.30 (*)
    │   │   ├── http v1.1.0
    │   │   │   ├── bytes v1.7.2
    │   │   │   ├── fnv v1.0.7
    │   │   │   └── itoa v1.0.11
    │   │   ├── http-body v1.0.1
    │   │   │   ├── bytes v1.7.2
    │   │   │   └── http v1.1.0 (*)
    │   │   ├── http-body-util v0.1.2
    │   │   │   ├── bytes v1.7.2
    │   │   │   ├── futures-util v0.3.30 (*)
    │   │   │   ├── http v1.1.0 (*)
    │   │   │   ├── http-body v1.0.1 (*)
    │   │   │   └── pin-project-lite v0.2.14
    │   │   ├── mime v0.3.17
    │   │   ├── pin-project-lite v0.2.14
    │   │   ├── sync_wrapper v0.1.2
    │   │   ├── tower-layer v0.3.3
    │   │   └── tower-service v0.3.3
    │   │   [build-dependencies]
    │   │   └── rustversion v1.0.17 (proc-macro)
    │   ├── bytes v1.7.2
    │   ├── futures-util v0.3.30 (*)
    │   ├── http v1.1.0 (*)
    │   ├── http-body v1.0.1 (*)
    │   ├── http-body-util v0.1.2 (*)
    │   ├── itoa v1.0.11
    │   ├── matchit v0.7.3
    │   ├── memchr v2.7.4
    │   ├── mime v0.3.17
    │   ├── percent-encoding v2.3.1
    │   ├── pin-project-lite v0.2.14
    │   ├── serde v1.0.210 (*)
    │   ├── sync_wrapper v1.0.1
    │   ├── tower v0.4.13
    │   │   ├── futures-core v0.3.30
    │   │   ├── futures-util v0.3.30 (*)
    │   │   ├── indexmap v1.9.3
    │   │   │   └── hashbrown v0.12.3
    │   │   │   [build-dependencies]
    │   │   │   └── autocfg v1.3.0
    │   │   ├── pin-project v1.1.5
    │   │   │   └── pin-project-internal v1.1.5 (proc-macro)
    │   │   │       ├── proc-macro2 v1.0.86 (*)
    │   │   │       ├── quote v1.0.37 (*)
    │   │   │       └── syn v2.0.77 (*)
    │   │   ├── pin-project-lite v0.2.14
    │   │   ├── rand v0.8.5 (*)
    │   │   ├── slab v0.4.9 (*)
    │   │   ├── tokio v1.38.1
    │   │   │   ├── bytes v1.7.2
    │   │   │   ├── libc v0.2.158
    │   │   │   ├── mio v0.8.11
    │   │   │   │   └── libc v0.2.158
    │   │   │   ├── pin-project-lite v0.2.14
    │   │   │   ├── socket2 v0.5.7
    │   │   │   │   └── libc v0.2.158
    │   │   │   └── tokio-macros v2.3.0 (proc-macro)
    │   │   │       ├── proc-macro2 v1.0.86 (*)
    │   │   │       ├── quote v1.0.37 (*)
    │   │   │       └── syn v2.0.77 (*)
    │   │   ├── tokio-util v0.7.12
    │   │   │   ├── bytes v1.7.2
    │   │   │   ├── futures-core v0.3.30
    │   │   │   ├── futures-sink v0.3.30
    │   │   │   ├── pin-project-lite v0.2.14
    │   │   │   └── tokio v1.38.1 (*)
    │   │   ├── tower-layer v0.3.3
    │   │   ├── tower-service v0.3.3
    │   │   └── tracing v0.1.40
    │   │       ├── pin-project-lite v0.2.14
    │   │       ├── tracing-attributes v0.1.27 (proc-macro)
    │   │       │   ├── proc-macro2 v1.0.86 (*)
    │   │       │   ├── quote v1.0.37 (*)
    │   │       │   └── syn v2.0.77 (*)
    │   │       └── tracing-core v0.1.32
    │   │           └── once_cell v1.19.0
    │   ├── tower-layer v0.3.3
    │   └── tower-service v0.3.3
    │   [build-dependencies]
    │   └── rustversion v1.0.17 (proc-macro)
    ├── base64 v0.22.1
    ├── bytes v1.7.2
    ├── h2 v0.4.6
    │   ├── atomic-waker v1.1.2
    │   ├── bytes v1.7.2
    │   ├── fnv v1.0.7
    │   ├── futures-core v0.3.30
    │   ├── futures-sink v0.3.30
    │   ├── http v1.1.0 (*)
    │   ├── indexmap v2.5.0
    │   │   ├── equivalent v1.0.1
    │   │   └── hashbrown v0.14.5
    │   ├── slab v0.4.9 (*)
    │   ├── tokio v1.38.1 (*)
    │   ├── tokio-util v0.7.12 (*)
    │   └── tracing v0.1.40 (*)
    ├── http v1.1.0 (*)
    ├── http-body v1.0.1 (*)
    ├── http-body-util v0.1.2 (*)
    ├── hyper v1.4.1
    │   ├── bytes v1.7.2
    │   ├── futures-channel v0.3.30 (*)
    │   ├── futures-util v0.3.30 (*)
    │   ├── h2 v0.4.6 (*)
    │   ├── http v1.1.0 (*)
    │   ├── http-body v1.0.1 (*)
    │   ├── httparse v1.9.4
    │   ├── httpdate v1.0.3
    │   ├── itoa v1.0.11
    │   ├── pin-project-lite v0.2.14
    │   ├── smallvec v1.13.2
    │   ├── tokio v1.38.1 (*)
    │   └── want v0.3.1
    │       └── try-lock v0.2.5
    ├── hyper-timeout v0.5.1
    │   ├── hyper v1.4.1 (*)
    │   ├── hyper-util v0.1.8
    │   │   ├── bytes v1.7.2
    │   │   ├── futures-channel v0.3.30 (*)
    │   │   ├── futures-util v0.3.30 (*)
    │   │   ├── http v1.1.0 (*)
    │   │   ├── http-body v1.0.1 (*)
    │   │   ├── hyper v1.4.1 (*)
    │   │   ├── pin-project-lite v0.2.14
    │   │   ├── socket2 v0.5.7 (*)
    │   │   ├── tokio v1.38.1 (*)
    │   │   ├── tower v0.4.13 (*)
    │   │   ├── tower-service v0.3.3
    │   │   └── tracing v0.1.40 (*)
    │   ├── pin-project-lite v0.2.14
    │   ├── tokio v1.38.1 (*)
    │   └── tower-service v0.3.3
    ├── hyper-util v0.1.8 (*)
    ├── percent-encoding v2.3.1
    ├── pin-project v1.1.5 (*)
    ├── prost v0.13.2 (*)
    ├── socket2 v0.5.7 (*)
    ├── tokio v1.38.1 (*)
    ├── tokio-stream v0.1.16
    │   ├── futures-core v0.3.30
    │   ├── pin-project-lite v0.2.14
    │   └── tokio v1.38.1 (*)
    ├── tower v0.4.13 (*)
    ├── tower-layer v0.3.3
    ├── tower-service v0.3.3
    └── tracing v0.1.40 (*)
[dev-dependencies]
├── opentelemetry v0.26.0 (/Users/ymgyt/rs/opentelemetry-rust/opentelemetry) (*)
├── prost-build v0.13.2
│   ├── bytes v1.7.2
│   ├── heck v0.5.0
│   ├── itertools v0.13.0
│   │   └── either v1.13.0
│   ├── log v0.4.22
│   ├── multimap v0.10.0
│   ├── once_cell v1.19.0
│   ├── petgraph v0.6.5
│   │   ├── fixedbitset v0.4.2
│   │   └── indexmap v2.5.0 (*)
│   ├── prettyplease v0.2.22
│   │   ├── proc-macro2 v1.0.86 (*)
│   │   └── syn v2.0.77
│   │       ├── proc-macro2 v1.0.86 (*)
│   │       ├── quote v1.0.37 (*)
│   │       └── unicode-ident v1.0.13
│   ├── prost v0.13.2 (*)
│   ├── prost-types v0.13.2
│   │   └── prost v0.13.2 (*)
│   ├── regex v1.10.6
│   │   ├── regex-automata v0.4.7
│   │   │   └── regex-syntax v0.8.4
│   │   └── regex-syntax v0.8.4
│   ├── syn v2.0.77 (*)
│   └── tempfile v3.12.0
│       ├── cfg-if v1.0.0
│       ├── fastrand v2.1.1
│       ├── once_cell v1.19.0
│       └── rustix v0.38.37
│           ├── bitflags v2.6.0
│           ├── errno v0.3.9
│           │   └── libc v0.2.158
│           └── libc v0.2.158
├── serde_json v1.0.128 (*)
├── tempfile v3.12.0 (*)
└── tonic-build v0.12.2
    ├── prettyplease v0.2.22 (*)
    ├── proc-macro2 v1.0.86 (*)
    ├── prost-build v0.13.2 (*)
    ├── quote v1.0.37 (*)
    └── syn v2.0.77 (*)

@ymgyt ymgyt added enhancement New feature or request triage:todo Needs to be traiged. labels Oct 2, 2024
@avandecreme
Copy link

I had the same issue, pinning tonic version to 0.12.3 fixes the issue

@ymgyt
Copy link
Contributor Author

ymgyt commented Oct 2, 2024

Thank you for the workaround. By pinning the tonic version to 0.12.3, the error was resolved.

@djc
Copy link
Contributor

djc commented Oct 2, 2024

Should force the bump to tonic 0.12.3 in the opentelemetry-proto instead of working around this downstream.

@lalitb lalitb self-assigned this Oct 2, 2024
@lalitb
Copy link
Member

lalitb commented Oct 2, 2024

@djc Can you assist with this? Resolving these dependency conflicts while keeping opentelemetry-sdk on Rust 1.65.0 and opentelemetry-proto on Rust 1.71.1 could be bit challenging, else I can fix it later this week.

@douggynix
Copy link

For those who have a Cargo.lock file in their Git repository for reproducible. it takes a simple cargo update command to fix the issue. Similarly In my case, the issue was due to the fact that my Cargo.lock still holds on to an older version of tonic crate.
I had to issue this command

cargo update tonic

This has upgraded tonic crate to the latest stable version 0.12.3 and this compilation error just gone. But, there are still other errors related to Traits exposed by the SDK for which I just opened another issue: #2167

@lalitb
Copy link
Member

lalitb commented Oct 2, 2024

Yes, the issue is only for the environments where tonic version is somehow locked/cached to the older version. Or else, where one of it's dependency has tonic pinned to v1.12.2 or lower. Doesn't necessarily require a patch release for the fix.

@adamtrilling
Copy link

Confirmed that cargo update tonic fixes it for me

@djc
Copy link
Contributor

djc commented Oct 3, 2024

Submitted #2168 to fix the underlying problem caused by #2159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage:todo Needs to be traiged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants