UNPKG

solarwinds-apm

Version:
106 lines 6.89 kB
import { type Instrumentation } from "@opentelemetry/instrumentation"; import { type InstrumentationConfigMap } from "@solarwinds-apm/instrumentations/web"; import * as v from "valibot"; declare global { var SW_APM_ENABLED: Config["serviceKey"]; var SW_APM_SERVICE_KEY: Config["serviceKey"]; var SW_APM_COLLECTOR: Config["collector"]; var SW_APM_LOG_LEVEL: Config["logLevel"]; var SW_APM_TRACING_MODE: Config["tracingMode"]; var SW_APM_EXPORT_LOGS_ENABLED: Config["exportLogsEnabled"]; var SW_APM_INSTRUMENTATIONS: Config["instrumentations"]; } export type Configuration = v.InferOutput<typeof schema>; export interface Config extends v.InferInput<typeof schema> { instrumentations?: Instrumentations; } interface Instrumentations { configs?: InstrumentationConfigMap; extra?: Instrumentation[]; } declare const schema: v.IntersectSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{ readonly enabled: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false", "1", "0"], undefined>, v.TransformAction<"0" | "1" | "true" | "false", boolean>]>], undefined>, true>; readonly serviceKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, { token: string | undefined; name: string; }>]> | v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, { token: string | undefined; name: string; }>]>, string>; readonly collector: v.OptionalSchema<v.UnionSchema<[v.InstanceSchema<{ new (url: string | URL, base?: string | URL): URL; prototype: URL; canParse(url: string | URL, base?: string | URL): boolean; createObjectURL(obj: Blob | MediaSource): string; parse(url: string | URL, base?: string | URL): URL | null; revokeObjectURL(url: string): void; }, undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RawTransformAction<string, URL>]>], undefined>, "apm.collector.na-01.cloud.solarwinds.com">; readonly logLevel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["all", "verbose", "debug", "info", "warn", "error", "none"], undefined>, v.TransformAction<"all" | "verbose" | "debug" | "info" | "warn" | "error" | "none", import("@opentelemetry/api").DiagLogLevel>]>, "warn">; readonly tracingMode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["enabled", "disabled"], undefined>, v.TransformAction<"enabled" | "disabled", boolean>]>, undefined>; readonly triggerTraceEnabled: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false", "1", "0"], undefined>, v.TransformAction<"0" | "1" | "true" | "false", boolean>]>], undefined>, boolean>; readonly exportLogsEnabled: v.OptionalSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.SchemaWithPipe<readonly [v.PicklistSchema<["true", "false", "1", "0"], undefined>, v.TransformAction<"0" | "1" | "true" | "false", boolean>]>], undefined>, false>; readonly transactionName: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, () => string>]>, v.SchemaWithPipe<readonly [v.CustomSchema<(span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined, undefined>, v.TransformAction<(span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined, (span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{ readonly scheme: v.LiteralSchema<"spanAttribute", undefined>; readonly delimiter: v.StringSchema<undefined>; readonly attributes: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>; }, undefined>, undefined>, v.TransformAction<{ scheme: "spanAttribute"; delimiter: string; attributes: string[]; }[], (span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined>]>], undefined>, undefined>; readonly transactionSettings: v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{ readonly tracing: v.SchemaWithPipe<readonly [v.PicklistSchema<["enabled", "disabled"], undefined>, v.TransformAction<"enabled" | "disabled", boolean>]>; readonly regex: v.UnionSchema<[v.InstanceSchema<RegExpConstructor, undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RawTransformAction<string, RegExp>]>], undefined>; }, undefined>, v.TransformAction<{ tracing: boolean; regex: RegExp; }, { tracing: boolean; matcher: (ident: string) => boolean; }>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{ readonly tracing: v.SchemaWithPipe<readonly [v.PicklistSchema<["enabled", "disabled"], undefined>, v.TransformAction<"enabled" | "disabled", boolean>]>; readonly matcher: v.CustomSchema<(ident: string) => boolean, undefined>; }, undefined>, v.TransformAction<{ tracing: boolean; matcher: (ident: string) => boolean; }, { tracing: boolean; matcher: (ident: string) => boolean; }>]>], undefined>, undefined>, undefined>; }, undefined>, v.TransformAction<{ enabled: boolean; serviceKey: { token: string | undefined; name: string; }; collector: URL; logLevel: import("@opentelemetry/api").DiagLogLevel; tracingMode?: boolean | undefined; triggerTraceEnabled: boolean; exportLogsEnabled: boolean; transactionName?: (() => string) | ((span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined) | ((span: import("@opentelemetry/sdk-trace-base").ReadableSpan) => string | undefined) | undefined; transactionSettings?: ({ tracing: boolean; matcher: (ident: string) => boolean; } | { tracing: boolean; matcher: (ident: string) => boolean; })[] | undefined; }, import("../shared/config.js").Configuration>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{ readonly instrumentations: v.OptionalSchema<v.ObjectSchema<{ readonly configs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>; readonly extra: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, readonly []>; }, undefined>, {}>; }, undefined>, v.TransformAction<{ instrumentations: { configs: { [x: string]: unknown; }; extra: unknown[]; }; }, { instrumentations: Required<Instrumentations>; }>]>], undefined>; export declare function read(): Configuration; export {}; //# sourceMappingURL=config.d.ts.map