This repository was archived by the owner on Oct 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
packages/opencensus-core/src/trace/sampler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ const maxNumber = 0xffffffffffffffff;
2525 */
2626export class Sampler {
2727 traceId : string ;
28- spanId : string ;
29- isRemote : boolean ;
3028 private idUpperBound : number ;
3129
3230 /**
@@ -38,12 +36,8 @@ export class Sampler{
3836 if ( traceId ) {
3937 this . traceId = traceId ;
4038 }
41- if ( spanId ) {
42- this . spanId = spanId ;
43- }
44- this . isRemote = isRemote || false ;
45-
4639 }
40+
4741 /**
4842 * @description Set idUpperBound with maxNumber
4943 * @returns a Sampler object
@@ -52,6 +46,7 @@ export class Sampler{
5246 this . idUpperBound = maxNumber ;
5347 return this ;
5448 }
49+
5550 /**
5651 * @description Set idUpperBound with minNumber
5752 * @returns a Sampler object
@@ -60,6 +55,7 @@ export class Sampler{
6055 this . idUpperBound = minNumber ;
6156 return this ;
6257 }
58+
6359 /**
6460 * @description Set idUpperBound with the probability. If probability
6561 * parameter is bigger then 1 set always. If probability parameter less
@@ -79,6 +75,7 @@ export class Sampler{
7975 this . idUpperBound = probability * maxNumber ;
8076 return this ;
8177 }
78+
8279 /**
8380 * @description
8481 * @param traceId
You can’t perform that action at this time.
0 commit comments