Skip to content

Commit

Permalink
fix: rename FailedNoneRetryable -> FailedNotRetryable (open-telemetry…
Browse files Browse the repository at this point in the history
…#247)

* fix: rename FailedNoneRetryable -> FailedNotRetryable

* fix: build
  • Loading branch information
mayurkale22 authored Sep 11, 2019
1 parent 8279133 commit 93c8b41
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

export enum ExportResult {
Success,
FailedNonRetryable,
FailedNotRetryable,
FailedRetryable,
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class InMemorySpanExporter implements SpanExporter {
spans: ReadableSpan[],
resultCallback: (result: ExportResult) => void
): void {
if (this._stopped) return resultCallback(ExportResult.FailedNonRetryable);
if (this._stopped) return resultCallback(ExportResult.FailedNotRetryable);
this._finishedSpans.push(...spans);
return resultCallback(ExportResult.Success);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ describe('InMemorySpanExporter', () => {
});
});

it('should return the FailedNonRetryable result after shutdown', () => {
it('should return the FailedNotRetryable result after shutdown', () => {
const exorter = new InMemorySpanExporter();
exorter.shutdown();

// after shutdown export should fail
exorter.export([], (result: ExportResult) => {
assert.strictEqual(result, ExportResult.FailedNonRetryable);
assert.strictEqual(result, ExportResult.FailedNotRetryable);
});
});
});
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-jaeger/src/jaeger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class JaegerExporter implements SpanExporter {
if (err) {
// @todo: decide whether to break out the loop on first error.
this._logger.error(`failed to append span: ${err}`);
if (done) return done(ExportResult.FailedNonRetryable);
if (done) return done(ExportResult.FailedNotRetryable);
}
});
}
Expand Down

0 comments on commit 93c8b41

Please sign in to comment.