Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
Remove inheritance
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
Yuri Shkuro committed Aug 28, 2019
1 parent 924712a commit 2e1cfd5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/samplers/_adapt_sampler.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export default adaptSampler;
* However, to keep compatible with existing behavior, onCreateSpan and onSetTag
* return retryable decision, because previously that's how tracer was behaving.
*/
class LegacySamplerV1Adapter extends BaseSamplerV2 {
class LegacySamplerV1Adapter implements Sampler {
apiVersion = SAMPLER_API_V2;
_delegate: LegacySamplerV1;

constructor(delegate: LegacySamplerV1) {
super(`SamplerV1Adapter(${delegate.name()})`);
this._delegate = delegate;
}

Expand All @@ -73,6 +73,10 @@ class LegacySamplerV1Adapter extends BaseSamplerV2 {
return { sample: false, retryable: true, tags: null };
}

toString(): string {
return this._delegate.toString();
}

close(callback: ?Function) {
this._delegate.close(callback);
}
Expand Down

0 comments on commit 2e1cfd5

Please sign in to comment.