opentelemetry-js
opentelemetry-js copied to clipboard
feat(otlp-exporter-http): add retries
Which problem is this PR solving?
Trying to implement retry logic in the export method inside the trace-otlp-http exporter. I'm opening this draft PR to get some feedback on this solution. Any feedback would be greatly appreciated!
The exporter spec is asking the retry logic to include an exponential back-off with jitter. Currently this solution doesn't include the "jitter" portion.
Changes made:
- Updated the
OTLPExporterBaseclass inexporter-trace-otlp-httpto include retry logic - Moved timer logic around property
exportTimeoutMillisfrom theBatchSpanProcessorBaseclass in thesdk-trace-basetoOTLPExporterBaseclass inexporter-trace-otlp-http - Updated
SpanExporterinterface insdk-trace-baseto include optional parameters that are being used by theexportmethod in theOTLPExporterBaseclass
Fixes # 1233
Short description of the changes
Type of change
- [ ] New feature (non-breaking change which adds functionality)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Tests not written yet. I tested this retry logic locally on an instrumented application.
Checklist:
- [ ] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated
Codecov Report
Merging #2717 (dbce62e) into main (2da6754) will decrease coverage by
0.91%. The diff coverage isn/a.
@@ Coverage Diff @@
## main #2717 +/- ##
==========================================
- Coverage 93.43% 92.51% -0.92%
==========================================
Files 159 75 -84
Lines 5452 2819 -2633
Branches 1145 541 -604
==========================================
- Hits 5094 2608 -2486
+ Misses 358 211 -147
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Not stale merely waiting on other things I think?
Yes it's not stale. Waiting on timeout pr which will be ready for final review soon now that we're back to a single lerna monorepo.
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Not stale. Will update this pr soon now that timeout pr was approved/merged.
Closing this draft pr in favor of this one: https://github.com/open-telemetry/opentelemetry-js/pull/3207