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 OTLP span exporter #787

Merged
merged 24 commits into from
Jun 10, 2020
Merged

Add OTLP span exporter #787

merged 24 commits into from
Jun 10, 2020

Conversation

ocelotl
Copy link
Contributor

@ocelotl ocelotl commented Jun 7, 2020

Fixes #786

@ocelotl ocelotl added the ext label Jun 7, 2020
@ocelotl ocelotl requested a review from a team as a code owner June 7, 2020 00:15
@ocelotl ocelotl self-assigned this Jun 7, 2020
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 7, 2020

CLA Check
The committers are authorized under a signed CLA.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

At first pass this is looking pretty good. I've made some suggestions in the PR, but I would like to see the following before approving:

  • _translate_spans method broken up, makes it easier to review and understand (as well as test)
  • docs entry for the exporter
  • changelogs entries
  • version numbers updated

@codeboten codeboten added this to the Beta v0.9 milestone Jun 8, 2020
@ocelotl ocelotl changed the title Add OTLP exporter Add OTLP span exporter Jun 8, 2020
@ocelotl ocelotl force-pushed the issue_785 branch 5 times, most recently from 49b310f to 67b96d8 Compare June 9, 2020 16:22
+ retry_info.retry_delay.nanos / 1.0e9
)

sleep(delay)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering how this would work with the batchspanprocessor's worker thread. Wouldn't sleep potentially block this thread from running for 15 minutes, so no other spans can be exported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, that would happen, but during the time the exporter blocks the batch span processor would have its queue filled up and will continue to export them once the block is over

@lzchen
Copy link
Contributor

lzchen commented Jun 10, 2020

Also, does this PR coming out mean that the OpenTelemetry receiver is ready in OT collector?

@codeboten
Copy link
Contributor

Also, does this PR coming out mean that the OpenTelemetry receiver is ready in OT collector?

It is! A few other sigs already implement native OTLP

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

This is looking great. Thanks for doing this work

ext/opentelemetry-ext-otlp/setup.cfg Outdated Show resolved Hide resolved
ext/opentelemetry-ext-otlp/setup.cfg Show resolved Hide resolved
return ExportTraceServiceRequest(resource_spans=resource_spans)

def export(self, spans: Sequence[SDKSpan]) -> SpanExportResult:
# expo returns a generator that yields delay values which grow
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like my question got lost, but any advantages of using expo instead of backoff's @backoff.on_exception decorator here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the question 😉

Copy link
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

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

LGTM!

@ocelotl ocelotl added the PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Jun 10, 2020
@codeboten codeboten merged commit 376c43e into open-telemetry:master Jun 10, 2020
codeboten pushed a commit to codeboten/opentelemetry-python that referenced this pull request Jun 11, 2020
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: alrex <aboten@lightstep.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OTLP span exporter
3 participants