frigus02/opentelemetry-application-insights

`opentelemetry::sdk::Provider::Resource` not being added to each Span/Event

Closed this issue · 3 comments

tot0 commented

The opentelemetry-zipkin exporter does it here.

I think it could be done in opentelemetry-application-insights like this:

impl Exporter {
   ....
   fn create_envelopes(...) ... {
      ...
      let mut attrs = evictedhashmap_to_hashmap(&span.attributes);
      for (k, v) in span.resource.iter() {
          attrs.insert(k.as_str(), v);
      }

If this sounds good then I can open a PR today.

Cheers!

Oh yeah, I completely missed that. Thank for reporting and thanks for the pull request.

I just pushed version 0.1.2 to crates.io. Thanks again for your help 👍

tot0 commented