@@ -2,8 +2,8 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';
22import  {  Event ,  EventHint  }  from  './event' ; 
33import  {  Integration  }  from  './integration' ; 
44import  {  LogLevel  }  from  './loglevel' ; 
5- import  {  Transport ,  TransportClass ,  TransportOptions  }  from  './transport' ; 
65import  {  SampleContext  }  from  './transaction' ; 
6+ import  {  Transport ,  TransportClass ,  TransportOptions  }  from  './transport' ; 
77
88/** Base configuration options for every SDK. */ 
99export  interface  Options  { 
@@ -82,16 +82,13 @@ export interface Options {
8282  /** 
8383   * Sample rate to determine trace sampling. 
8484   * 
85-    * 0.0 = 0% chance of instrumenting  
86-    * 1.0 = 100% chance of instrumenting  
85+    * 0.0 = 0% chance of a given trace being sent (send no traces)  
86+    * 1.0 = 100% chance of a given trace being sent (send all traces)  
8787   * 
88-    * Default: 0.0  
88+    * Can be omitted without disabling tracing if `tracesSampler` is defined. If neither is defined, tracing is disabled.  
8989   */ 
9090  tracesSampleRate ?: number ; 
9191
92-   /** Function to compute tracing sample rate dynamically and filter unwanted traces */ 
93-   tracesSampler ?( traceContext : SampleContext ) : number  |  null ; 
94- 
9592  /** Attaches stacktraces to pure capture message / log integrations */ 
9693  attachStacktrace ?: boolean ; 
9794
@@ -148,4 +145,13 @@ export interface Options {
148145   * @returns  The breadcrumb that will be added | null. 
149146   */ 
150147  beforeBreadcrumb ?( breadcrumb : Breadcrumb ,  hint ?: BreadcrumbHint ) : Breadcrumb  |  null ; 
148+ 
149+   /** 
150+    * Function to compute tracing sample rate dynamically and filter unwanted traces. 
151+    * 
152+    * Can be defined in place of `tracesSampleRate`. If neither is defined, tracing is disabled. 
153+    * 
154+    * @returns  A sample rate or `null` to drop the trace. 
155+    */ 
156+   tracesSampler ?( traceContext : SampleContext ) : number  |  null ; 
151157} 
0 commit comments