-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[sumologicexporter] Add sender #1693
[sumologicexporter] Add sender #1693
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1693 +/- ##
==========================================
+ Coverage 89.39% 89.41% +0.02%
==========================================
Files 371 372 +1
Lines 18166 18269 +103
==========================================
+ Hits 16240 16336 +96
- Misses 1434 1438 +4
- Partials 492 495 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@sumo-drosiek can you please try to make codecov happy? |
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
@bogdandrutu I tried to make codecov happy, but I don't have idea how to cover |
exporter/sumologicexporter/sender.go
Outdated
droppedRecords []pdata.LogRecord | ||
currentRecords []pdata.LogRecord | ||
formattedLine string | ||
err error |
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.
The same comment applies to other properties, but do you need err
to be at this scope? You are one bug away from a problem that is hard to detect :-) Move the err
inside the loop, so that you won't leak it elsewhere.
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.
Moved together with formattedLine
. Other variables require broaden scope
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.
There are still a few places where the coverage is missing, especially on error handling, but LGTM overall.
This patch removes `ApplyConfig` method and `Config` struct from `go.opentelemetry.io/otel/sdk/trace` package. To ensure valid config for TracerProvider, it adds `ensureValidTracerProviderConfig` private function. Jaeger and Zipkin have been used the `Config` directly across package boundaries. Since `Config` is removed, they can't use it. This change, thus, replaces `WithSDK` with `WithSDKOptions`. Resolves #1636, #1705.
Description:
Add sender to Sumo Logic exporter as part of #1498
Sender is responsible for building request body and to send it to the service with addition of required headers.
It avoids sending too big request by batching the body
Link to tracking Issue: #1498
Testing:
Documentation: