Skip to content
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

feat(sumologicexporter): do not send empty OTLP requests #660

Merged
merged 3 commits into from
Jul 11, 2022

Conversation

andrzej-stencel
Copy link
Contributor

@andrzej-stencel andrzej-stencel commented Jul 11, 2022

Currently, when en empty metrics or traces dataset is passed to the Sumo Logic exporter, an empty-bodied request is sent to the backend.
This behavior is in fact in line with what the upstream OTLP HTTP exporter does for all signals - logs, metrics and traces.

This change modifies this behavior for metrics and traces so that the empty request is not sent. This is to prevent an unnecessary network call.

For logs, the current behavior is to not send the empty request when an empty dataset is passed to the exporter, and there is no change to this behavior.

When en empty metrics or traces dataset is passed to the Sumo Logic exporter,
an empty-bodied request is sent.
This behavior is in fact in line with what the upstream OTLP HTTP exporter does for all signals - logs, metrics and traces.
For metrics and traces in OTLP format,
if there is no data to be sent,
do not send an empty request.
This is a performance optimization to save on unneeded network calls.
For logs, en empty request is not being sent,
so there is no change needed.
@github-actions github-actions bot added the go label Jul 11, 2022
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 11, 2022
@andrzej-stencel andrzej-stencel marked this pull request as ready for review July 11, 2022 13:09
@andrzej-stencel andrzej-stencel requested a review from a team as a code owner July 11, 2022 13:09
@andrzej-stencel andrzej-stencel merged commit 92d84e2 into main Jul 11, 2022
@andrzej-stencel andrzej-stencel deleted the empty-metrics-request branch July 11, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants