opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

otelsarama: Add WithAllowRootSpanStart option

Open keitwb opened this issue 3 years ago • 3 comments

This will allow the parent app to control whether a span will be created based on whether the message contains injected context.

The default is 'true' which will preserve the original behavior.

keitwb avatar May 04 '21 21:05 keitwb

@kweitb Generally the code looks OK but I am not sure it would not be better to use Sampler which filter's out span's without a parent. Have you checked Sampler interface and existing samplers?

pellared avatar May 05 '21 14:05 pellared

Codecov Report

Merging #770 (0c1c8de) into main (13d72c9) will increase coverage by 0.0%. The diff coverage is 95.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #770   +/-   ##
=====================================
  Coverage   78.4%   78.4%           
=====================================
  Files         62      62           
  Lines       2737    2747   +10     
=====================================
+ Hits        2146    2156   +10     
  Misses       456     456           
  Partials     135     135           
Impacted Files Coverage Δ
...n/github.com/Shopify/sarama/otelsarama/producer.go 95.2% <93.3%> (+0.3%) :arrow_up:
...ion/github.com/Shopify/sarama/otelsarama/option.go 100.0% <100.0%> (ø)

codecov[bot] avatar May 05 '21 16:05 codecov[bot]

@kweitb Generally the code looks OK but I am not sure it would not be better to use Sampler which filter's out span's without a parent. Have you checked Sampler interface and existing samplers?

That sounds promising but it's not clear to me how to do this.

keitwb avatar May 11 '21 13:05 keitwb

@keitwb Do you still want/need this? Are you planning to update the PR? Should the PR be closed?

pellared avatar Jul 31 '23 11:07 pellared

otelsarama is deprecated. I am closing this PR. More info: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4091

pellared avatar Sep 06 '23 12:09 pellared