import { ResourceDetectionConfig } from "./config.mjs"; import { AnyValue } from "@opentelemetry/api"; //#region src/types.d.ts /** * Interface for a Resource Detector. * A resource detector returns a set of detected resource attributes. * A detected resource attribute may be an {@link AnyValue} or a Promise of an AnyValue. * Attributes values that are not "simple" attributes are dropped with a warning. * See OTEP 4485. */ interface ResourceDetector { /** * Detect resource attributes. * * @returns a {@link DetectedResource} object containing detected resource attributes */ detect(config?: ResourceDetectionConfig): DetectedResource; } type DetectedResource = { /** * Detected resource attributes. */ attributes?: DetectedResourceAttributes; }; /** * An object representing detected resource attributes. * Value may be {@link AnyValue}s, a promise to an {@link AnyValue}, or undefined. */ type DetectedResourceAttributeValue = MaybePromise; /** * An object representing detected resource attributes. * Values may be {@link AnyValue}s or a promise to an {@link AnyValue}. */ type DetectedResourceAttributes = Record; type MaybePromise = T | Promise; type RawResourceAttribute = [string, MaybePromise]; /** * Options for creating a {@link Resource}. */ type ResourceOptions = { schemaUrl?: string; }; //#endregion export { DetectedResource, DetectedResourceAttributes, MaybePromise, RawResourceAttribute, ResourceDetector, ResourceOptions }; //# sourceMappingURL=types.d.mts.map