Skip to content

Commit 75d5cfd

Browse files
committed
Add ignore/allow urls config option
1 parent 4f1e605 commit 75d5cfd

File tree

1 file changed

+13
-0
lines changed
  • plugins/web/opentelemetry-instrumentation-document-load/src

1 file changed

+13
-0
lines changed

plugins/web/opentelemetry-instrumentation-document-load/src/types.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export interface ResourceFetchCustomAttributeFunction {
2929
*/
3030
export interface DocumentLoadInstrumentationConfig
3131
extends InstrumentationConfig {
32+
/**
33+
* URLs that partially match any regex or exactly match strings in allowUrls
34+
* will be traced.
35+
*/
36+
allowUrls?: Array<string | RegExp>;
37+
3238
/** Function for adding custom attributes on the document load, document fetch and or resource fetch spans */
3339
applyCustomAttributesOnSpan?: {
3440
documentLoad?: DocumentLoadCustomAttributeFunction;
@@ -69,4 +75,11 @@ export interface DocumentLoadInstrumentationConfig
6975
* firstPaint
7076
*/
7177
ignorePerformancePaintEvents?: boolean;
78+
79+
/**
80+
* URLs that partially match any regex in ignoreUrls will not be traced.
81+
* In addition, URLs that are _exact matches_ of strings in ignoreUrls will
82+
* also not be traced.
83+
*/
84+
ignoreUrls?: Array<string | RegExp>;
7285
}

0 commit comments

Comments
 (0)