Skip to content

Commit

Permalink
add comment re: spankind==consumption
Browse files Browse the repository at this point in the history
If spankind == consumption we always create a
transaction, since we cannot differentiate between
active and passive message consumption types from
incoming otel spans.
  • Loading branch information
stuartnelson3 committed May 31, 2021
1 parent 5b663ed commit 98d4f85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions processor/otel/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ func (c *Consumer) convertSpan(
var span *model.Span

name := otelSpan.Name()
// Message consumption results in either a transaction or a span based
// on whether the consumption is active or passive. Otel spans
// currently do not have the metadata to make this distinction. For
// now, we assume that the majority of consumption is passive, and
// therefore start a transaction whenever span kind == consumer.
if root || otelSpan.Kind() == pdata.SpanKindSERVER || otelSpan.Kind() == pdata.SpanKindCONSUMER {
transaction = &model.Transaction{
Metadata: metadata,
Expand Down

0 comments on commit 98d4f85

Please sign in to comment.