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

send batches concurrently in each flush and compress payload #720

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

hstan
Copy link
Member

@hstan hstan commented Aug 6, 2024

Send batches concurrently in each flush and compress payload.

This should shorten process time for each flush and also reduce the size of payload.

@@ -1,6 +1,8 @@
package data

import (
"bytes"
"compress/gzip"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be fine for now, but we will need to look at adopting lz4 compression to help improve performance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if there's choice for now as the OTLP doc is quite confusing, specification here says it only need to support gzip to meet the minimal requirement for a OTLP server

atomic.AddUint64(&bd.seriesSent, uint64(b.lenMetrics()))
}
func(g group) {
eg.Go(func() error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool this means async sends? Do we have any retries in the otlp backend?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah retry is in the postMetrics

@hstan hstan merged commit 8c705be into master Aug 7, 2024
5 checks passed
@hstan hstan deleted the htan/make-async-send-async branch August 7, 2024 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants