@ogcio/o11y-sdk-react
Version:
Opentelemetry standard instrumentation SDK for React based project
59 lines (55 loc) • 1.49 kB
text/typescript
interface SDKConfig {
/**
* The opentelemetry collector entrypoint GRPC url.
* If the collectoUrl is null or undefined, the instrumentation will not be activated.
* @example http://alloy:4317
*/
collectorUrl: string;
/**
* Name of your application used for the collector to group logs
*/
serviceName?: string;
/**
* Diagnostic log level for the internal runtime instrumentation
*
* @type string
* @default INFO
*/
diagLogLevel?: SDKLogLevel;
/**
* Collector signals processing mode.
* signle: makes an http/grpc request for each signal and it is immediately processed inside grafana
* batch: sends multiple signals within a time window, optimized to reduce http/grpc calls in production
*
* @type string
* @default batch
*/
collectorMode?: SDKCollectorMode;
}
export interface FaroSDKConfig extends SDKConfig {
/**
* String with single or multiple URLs separated by comma used by the instrumentation to ignore CORS errors and send signals through it
* @example http://localhost:9000,http://localhost:8000
* @example http://localhost:9000
*/
corsTraceHeaders?: string;
/**
* Enable/Disable PII detection for GDPR data
*/
detection?: {
/**
* Redact email address
* @default true
*/
email?: boolean;
};
}
export type SDKCollectorMode = "single" | "batch";
export type SDKLogLevel =
| "NONE"
| "ERROR"
| "WARN"
| "INFO"
| "DEBUG"
| "VERBOSE"
| "ALL";