-
Notifications
You must be signed in to change notification settings - Fork 812
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
fix(otlp-exporter-base): fix handling of destroyed requests #4929
fix(otlp-exporter-base): fix handling of destroyed requests #4929
Conversation
export const DEFAULT_EXPORT_INITIAL_BACKOFF = 1000; | ||
export const DEFAULT_EXPORT_MAX_BACKOFF = 5000; | ||
export const DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5; | ||
|
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.
reviewer note: this is unrelated. They're not used anymore, so I decided to remove them.
try { | ||
assert.strictEqual(result.code, core.ExportResultCode.FAILED); | ||
const error = result.error as OTLPExporterError; | ||
assert.ok(error !== undefined); | ||
assert.strictEqual(error.message, 'Request Timeout'); | ||
} catch (e) { | ||
done(e); | ||
} |
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.
reviewer note: i changed this test as to ensure it does not show up as timed out when assertions fail.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4929 +/- ##
==========================================
- Coverage 93.29% 92.89% -0.41%
==========================================
Files 84 317 +233
Lines 1700 8243 +6543
Branches 349 1675 +1326
==========================================
+ Hits 1586 7657 +6071
- Misses 114 586 +472
|
Which problem is this PR solving?
This is an unreleased bug, therefore not adding a changelog entry.
Priority: P3 (logspam)
A destroyed request is currently treated as never successful and therefore always times out, which causes the PeriodicExportingMetricReader to log an error, even though the request itself was successful.
This PR fixes this issue and adds tests for
HttpExporterTransport
, added in #4743.Type of change
How Has This Been Tested?