{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n  ContextManager,\n  MeterProvider,\n  TextMapPropagator,\n} from '@opentelemetry/api';\nimport type { Resource } from '@opentelemetry/resources';\nimport type { IdGenerator } from './IdGenerator';\nimport type { Sampler } from './Sampler';\nimport type { SpanProcessor } from './SpanProcessor';\n\n/**\n * TracerConfig provides an interface for configuring a Basic Tracer.\n */\nexport interface TracerConfig {\n  /**\n   * Sampler determines if a span should be recorded or should be a NoopSpan.\n   */\n  sampler?: Sampler;\n\n  /** General Limits */\n  generalLimits?: GeneralLimits;\n\n  /** Span Limits */\n  spanLimits?: SpanLimits;\n\n  /** Resource associated with trace telemetry  */\n  resource?: Resource;\n\n  /**\n   * Generator of trace and span IDs\n   * The default idGenerator generates random ids\n   */\n  idGenerator?: IdGenerator;\n\n  /**\n   * How long the forceFlush can run before it is cancelled.\n   * The default value is 30000ms\n   */\n  forceFlushTimeoutMillis?: number;\n\n  /**\n   * List of SpanProcessor for the tracer\n   */\n  spanProcessors?: SpanProcessor[];\n\n  /**\n   * A meter provider to record trace SDK metrics to.\n   * @experimental This option is experimental and is subject to breaking changes in minor releases.\n   */\n  meterProvider?: MeterProvider;\n}\n\n/**\n * Configuration options for registering the API with the SDK.\n * Undefined values may be substituted for defaults, and null\n * values will not be registered.\n */\nexport interface SDKRegistrationConfig {\n  /** Propagator to register as the global propagator */\n  propagator?: TextMapPropagator | null;\n\n  /** Context manager to register as the global context manager */\n  contextManager?: ContextManager | null;\n}\n\n/** Global configuration limits of trace service */\nexport interface GeneralLimits {\n  /** attributeValueLengthLimit is maximum allowed attribute value size */\n  attributeValueLengthLimit?: number;\n  /** attributeCountLimit is number of attributes per trace */\n  attributeCountLimit?: number;\n}\n\n/** Global configuration of trace service */\nexport interface SpanLimits {\n  /** attributeValueLengthLimit is maximum allowed attribute value size */\n  attributeValueLengthLimit?: number;\n  /** attributeCountLimit is number of attributes per span */\n  attributeCountLimit?: number;\n  /** linkCountLimit is number of links per span */\n  linkCountLimit?: number;\n  /** eventCountLimit is number of message events per span */\n  eventCountLimit?: number;\n  /** attributePerEventCountLimit is the maximum number of attributes allowed per span event */\n  attributePerEventCountLimit?: number;\n  /** attributePerLinkCountLimit is the maximum number of attributes allowed per span link */\n  attributePerLinkCountLimit?: number;\n}\n\n/** Interface configuration for a buffer. */\nexport interface BufferConfig {\n  /** The maximum batch size of every export. It must be smaller or equal to\n   * maxQueueSize. The default value is 512. */\n  maxExportBatchSize?: number;\n\n  /** The delay interval in milliseconds between two consecutive exports.\n   *  The default value is 5000ms. */\n  scheduledDelayMillis?: number;\n\n  /** How long the export can run before it is cancelled.\n   * The default value is 30000ms */\n  exportTimeoutMillis?: number;\n\n  /** The maximum queue size. After the size is reached spans are dropped.\n   * The default value is 2048. */\n  maxQueueSize?: number;\n}\n\n/** Interface configuration for BatchSpanProcessor on browser */\nexport interface BatchSpanProcessorBrowserConfig extends BufferConfig {\n  /** Disable flush when a user navigates to a new page, closes the tab or the browser, or,\n   * on mobile, switches to a different app. Auto flush is enabled by default. */\n  disableAutoFlushOnDocumentHide?: boolean;\n}\n"]}