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

sarama: fix span name and add payload size sem conv

Open srikanthccv opened this issue 2 years ago • 5 comments

Updates the span name to follow messaging semantic conventions and adds message payload size attribute

srikanthccv avatar Jul 23 '22 03:07 srikanthccv

Codecov Report

Merging #2594 (3ae7063) into main (ace6b3c) will increase coverage by 0.0%. The diff coverage is 87.5%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2594   +/-   ##
=====================================
  Coverage   74.4%   74.4%           
=====================================
  Files        145     145           
  Lines       6685    6707   +22     
=====================================
+ Hits        4974    4993   +19     
- Misses      1564    1566    +2     
- Partials     147     148    +1     
Impacted Files Coverage Δ
...n/github.com/Shopify/sarama/otelsarama/producer.go 93.7% <86.9%> (-1.0%) :arrow_down:
...github.com/Shopify/sarama/otelsarama/dispatcher.go 100.0% <100.0%> (ø)

codecov[bot] avatar Jul 23 '22 03:07 codecov[bot]

You mention you're updating the span name to follow semantic conventions. Is there a spec specifying those conventions for kafka, or examples of other libraries using the new name?

dmathieu avatar Jul 27 '22 10:07 dmathieu

Is there a spec specifying those conventions for kafka, or examples of other libraries using the new name?

I didn't lookup other libraries. There is no spec specifying those conventions for kafka or (any specific message system).

srikanthccv avatar Jul 27 '22 10:07 srikanthccv

I'm not sure I understand how this is an update to "follow messaging semantic conventions" if no other libraries is doing the same thing, and no conventions are defined?

dmathieu avatar Jul 27 '22 10:07 dmathieu

if no other libraries is doing the same thing

There is more likely chance other instrumentations are also not following the semconv so I didn't bother looking at them.

and no conventions are defined?

I am not sure if they are going to add naming conventions for every messaging system. There is a general guideline which says span name should <destination (topic)> <operation name>. More here.

srikanthccv avatar Jul 27 '22 11:07 srikanthccv

I think this has enough approvals and comments are addressed @open-telemetry/go-instrumentaiton-maintainers Can someone merge this?

srikanthccv avatar Aug 10 '22 13:08 srikanthccv

Can this be merged so that It will be part of the next release? I would like to use this feature.

srikanthccv avatar Sep 08 '22 19:09 srikanthccv