8000 dataloader and tracing feature not working together · Issue #1726 · async-graphql/async-graphql · GitHub
[go: up one dir, main page]

Skip to content
dataloader and tracing feature not working together #1726
Open
@dancixx

Description

@dancixx

Expected Behavior

Dont get a compiler error.

Actual Behavior

37.40 error[E0433]: failed to resolve: could not find `tracing` in the list of imported crates
37.40    --> /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-graphql-7.0.17/src/dataloader/mod.rs:421:37
37.40     |
37.40 421 |     #[cfg_attr(feature = "tracing", instrument(skip_all))]
37.40     |                                     ^^^^^^^^^^^^^^^^^^^^ could not find `tracing` in the list of imported crates
37.40     |
37.40     = note: this error originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
37.40 help: consider importing one of these traits
37.40     |
37.40 61  + use crate::dataloader::tracing::Instrument;
37.40     |
37.40 61  + use tracing_futures::Instrument;
37.40     |
37.40 61  + use tracinglib::Instrument;
37.40     |
37.40 
37.40 error[E0433]: failed to resolve: could not find `tracing` in the list of imported crates
37.40    --> /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-graphql-7.0.17/src/dataloader/mod.rs:446:37
37.40     |
37.40 446 |     #[cfg_attr(feature = "tracing", instrument(skip_all))]
37.40     |                                     ^^^^^^^^^^^^^^^^^^^^ could not find `tracing` in the list of imported crates
37.40     |
37.40     = note: this error originates in the attribute macro `instrument` (in Nightly builds, run with -Z macro-backtrace for more info)
37.40 help: consider importing one of these traits
37.40     |
37.40 61  + use crate::dataloader::tracing::Instrument;
37.40     |
37.40 61  + use tracing_futures::Instrument;
37.40     |
37.40 61  + use tracinglib::Instrument;

Steps to Reproduce the Problem

  1. add async-graphql with dataloader and tracing
  2. use the tracing extension

Specifications

  • Version: latest
  • Platform: ubuntu 22.04 (on macos is working)
  • Subsystem:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0