-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kafka] BUG - stop creating spans on empty reads #3363
[kafka] BUG - stop creating spans on empty reads #3363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still draft but it is looking good.
activity.SetException(exception); | ||
} | ||
var activity = KafkaInstrumentation.StartConsumerActivity(consumeResult, (DateTimeOffset)state.StartTime!, instance!); | ||
if (exception is not null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may hide some transient network errors (since consumeResult
has to exist) ... not sure if good or bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave it as is for the quick fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that guaranteed by the check on line 40?
LGTM. |
Why
When
Consume
is called without timeout specified (e.g either withCancellationToken
, or with no params), spans will be generated, by default, every 100ms (default value ofCancellationDelayMaxMs
fromConsumerConfig
).This results in great number of spans generated.
What
No longer create spans for empty reads.
Tests
Existing tests.
Checklist
CHANGELOG.md
is updated.- [ ] Documentation is updated.- [ ] New features are covered by tests.