Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurkale22 committed Sep 9, 2019
1 parent 3f6381d commit e075f8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@ import { ReadableSpan } from './ReadableSpan';
import { ExportResult } from './ExportResult';

/**
* This class can be used for testing purposes. It saves the exported spans
* in a list in memory that can be retrieve using the `getFinishedSpans`
* This class can be used for testing purposes. It stores the exported spans
* in a list in memory that can be retrieve using the `getFinishedSpans()`
* method.
*/
export class InMemorySpanExporter implements SpanExporter {
private _finishedSpan: ReadableSpan[] = [];
private _finishedSpans: ReadableSpan[] = [];
private _stopped = false;

export(
spans: ReadableSpan[],
resultCallback: (result: ExportResult) => void
): void {
if (this._stopped) return resultCallback(ExportResult.FailedNonRetryable);
this._finishedSpan.push(...spans);
this._finishedSpans.push(...spans);
return resultCallback(ExportResult.Success);
}

shutdown(): void {
this._stopped = true;
this._finishedSpan = [];
this._finishedSpans = [];
}

reset() {
this._finishedSpan = [];
this._finishedSpans = [];
}

getFinishedSpans(): ReadableSpan[] {
return this._finishedSpan;
return this._finishedSpans;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { NoopScopeManager } from '@opentelemetry/scope-base';
class TestProcessor implements SpanProcessor {
spans: Span[] = [];
onStart(span: Span): void {}

onEnd(span: Span): void {
this.spans.push(span);
}
Expand Down

0 comments on commit e075f8b

Please sign in to comment.