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

Add processing timings for each step in traces pipeline #318

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

srikanthccv
Copy link
Member

No description provided.

@ankitnayan
Copy link
Contributor

Could we figure out anything from this?

@srikanthccv
Copy link
Member Author

We now have clarity on the time it takes in each step https://signoz-team.slack.com/archives/C02SGR46RRR/p1714625576474649. We looked into whether async inserts help, the wait_for_async_insert setting decides whether we wait till ack. If we do not wait for ack we risk losing data because we won't be able to retry. If we wait for ACK, it doesn't make any difference from the write duration.

We need to parallelize these 4 calls

func (w *SpanWriter) WriteBatchOfSpans(ctx context.Context, batch []*Span) error {
if w.spansTable != "" {
if err := w.writeModelBatch(ctx, batch); err != nil {
w.logger.Error("Could not write a batch of spans to model table: ", zap.Error(err))
return err
}
}
if w.indexTable != "" {
if err := w.writeIndexBatch(ctx, batch); err != nil {
w.logger.Error("Could not write a batch of spans to index table: ", zap.Error(err))
return err
}
}
if w.errorTable != "" {
if err := w.writeErrorBatch(ctx, batch); err != nil {
w.logger.Error("Could not write a batch of spans to error table: ", zap.Error(err))
return err
}
}
if w.attributeTable != "" && w.attributeKeyTable != "" {
if err := w.writeTagBatch(ctx, batch); err != nil {
w.logger.Error("Could not write a batch of spans to tag/tagKey tables: ", zap.Error(err))
return err
}
}
return nil
}
and writeIndexBatch can further be broken to send in multiple batches.

@ankitnayan
Copy link
Contributor

ankitnayan commented May 16, 2024

If we wait for ACK, it doesn't make any difference from the write duration.

Still it would lead to better batching when multiple otel-collectors are writing to clickhouse?

SigNoz/signoz#5013

@srikanthccv
Copy link
Member Author

Yes, and you already mentioned the main drawback of the async in the linked issue.

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.

None yet

2 participants