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 intocensus-instrumentation:masterfrom
kornholi:fix/stackdriver-batching-2
Dec 6, 2018
Merged

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

Conversation

@kornholi
Copy link
Copy Markdown
Contributor

@kornholi kornholi commented Dec 4, 2018

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
Copy link
Copy Markdown
Member

c24t commented Dec 4, 2018

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

@kornholi
Copy link
Copy Markdown
Contributor Author

kornholi commented Dec 5, 2018

Regression from #291

Copy link
Copy Markdown
Member

@c24t c24t left a comment

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.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants