-
Notifications
You must be signed in to change notification settings - Fork 661
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
Conversation
There was a problem hiding this 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
...opentelemetry-ext-otlpexporter/src/opentelemetry/ext/otlpexporter/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...opentelemetry-ext-otlpexporter/src/opentelemetry/ext/otlpexporter/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...opentelemetry-ext-otlpexporter/src/opentelemetry/ext/otlpexporter/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
...opentelemetry-ext-otlpexporter/src/opentelemetry/ext/otlpexporter/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
49b310f
to
67b96d8
Compare
ext/opentelemetry-ext-otlp/src/opentelemetry/ext/otlp/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-otlp/src/opentelemetry/ext/otlp/trace_exporter/__init__.py
Show resolved
Hide resolved
ext/opentelemetry-ext-otlp/src/opentelemetry/ext/otlp/trace_exporter/__init__.py
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-otlp/src/opentelemetry/ext/otlp/trace_exporter/__init__.py
Show resolved
Hide resolved
ext/opentelemetry-ext-otlp/src/opentelemetry/ext/otlp/trace_exporter/__init__.py
Show resolved
Hide resolved
+ retry_info.retry_delay.nanos / 1.0e9 | ||
) | ||
|
||
sleep(delay) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 |
There was a problem hiding this 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
return ExportTraceServiceRequest(resource_spans=resource_spans) | ||
|
||
def export(self, spans: Sequence[SDKSpan]) -> SpanExportResult: | ||
# expo returns a generator that yields delay values which grow |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the question 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: alrex <[email protected]>
Co-authored-by: alrex <[email protected]>
…porter/__init__.py Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Leighton Chen <[email protected]> Co-authored-by: alrex <[email protected]>
Fixes #786