eaze / tracing-honeycomb

Fork of https://github.com/inanna-malick/tracing-honeycomb
MIT License
17 stars 19 forks source link

Honeycomb is not receiving events #21

Open Pet3ris opened 1 year ago

Pet3ris commented 1 year ago

I'm setting the subscriber configuration in the most basic way:

// Use honeycomb
let honeycomb_api_key = dotenv::var("HONEYCOMB_API_KEY").unwrap();
let honeycomb_config = libhoney::Config {
    options: libhoney::client::Options {
        api_key: honeycomb_api_key,
        dataset: "my-dataset".to_string(),
        ..libhoney::client::Options::default()
    },
    transmission_options: libhoney::transmission::Options::default(),
};
let telemetry_layer = tracing_honeycomb::new_honeycomb_telemetry_layer("my-service", honeycomb_config);
let honey_subscriber = tracing_subscriber::Registry::default()
    .with(tracing::level_filters::LevelFilter::INFO)
    .with(tracing_subscriber::fmt::Layer::default())
    .with(telemetry_layer);
tracing::subscriber::set_global_default(honey_subscriber).expect("setting global default failed");

I can see events logged in stdout but nothing is received on the Honeycomb layer. I've checked that the API key is the correct one. Any way to see what's going on?

Pet3ris commented 1 year ago

As a workaround, there is now a good implementation here: https://github.com/Dhghomon/rust_opentelemetry_honeycomb.

fayalalebrun commented 2 months ago

You need to use register_dist_tracing_root. Anyways, I think honeycomb is moving towards opentelemetry.