Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Fix span batching to stackdriver - #425

Merged
bogdandrutu merged 3 commits into
census-instrumentation:masterfrom
kornholi:fix/stackdriver-batching-2
Dec 6, 2018
Merged

Fix span batching to stackdriver#425
bogdandrutu merged 3 commits into
census-instrumentation:masterfrom
kornholi:fix/stackdriver-batching-2

Conversation

@kornholi

@kornholi kornholi commented Dec 4, 2018

Copy link
Copy Markdown
Contributor

Currently every trace is being exported individually, burning through Stackdriver quota.

screen shot 2018-12-03 at 6 00 29 pm

This change was deployed at 5:46 PM.

@c24t @liyanhui1228 could you take a look?

@c24t

c24t commented Dec 4, 2018

Copy link
Copy Markdown
Member

@kornholi is this fixing a regression in the stackdriver exporter or an improvement?

@kornholi

kornholi commented Dec 5, 2018

Copy link
Copy Markdown
Contributor Author

Regression from #291

@c24t c24t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, please file a ticket for the stackdriver quota issue (instead of the FIXME comment) if this is still causing problems for you.

trace = span_data.format_legacy_trace_json(sds)
stackdriver_spans = self.translate_to_stackdriver(trace)
self.client.batch_write_spans(project, stackdriver_spans)
stackdriver_spans.extend(self.translate_to_stackdriver(trace))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Out of curiosity: why change this to a generator if you're just appending the results?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

to avoid intermediate lists

@bogdandrutu
bogdandrutu merged commit 1f47a11 into census-instrumentation:master Dec 6, 2018
@kornholi
kornholi deleted the fix/stackdriver-batching-2 branch December 6, 2018 03:13
c24t pushed a commit to c24t/opencensus-python that referenced this pull request Jan 16, 2019
* Fix span batching to stackdriver

* Lose FIXME comment
@c24t c24t mentioned this pull request Jan 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.