import { n as TraceContext, t as AttributeValue$1 } from "./trace-context-Cijqoi6e.cjs";
import { Span } from "@opentelemetry/api";
import { Resource } from "@opentelemetry/resources";

//#region src/attributes/types.d.ts
interface UserAttrs {
  id?: string;
  email?: string;
  name?: string;
  fullName?: string;
  hash?: string;
  roles?: string[];
}
interface SessionAttrs {
  id?: string;
  previousId?: string;
}
interface DeviceAttrs {
  id?: string;
  manufacturer?: string;
  modelIdentifier?: string;
  modelName?: string;
}
interface HTTPServerAttrs {
  method?: string;
  route?: string;
  statusCode?: number;
  bodySize?: number;
  requestSize?: number;
  responseSize?: number;
  resendCount?: number;
}
interface HTTPClientAttrs {
  method?: string;
  url?: string;
  statusCode?: number;
}
interface DBAttrs {
  system?: string;
  /** Database name - maps to db.namespace (db.name is deprecated) */
  name?: string;
  /** Explicit namespace - takes precedence over name if both provided */
  namespace?: string;
  operation?: string;
  collectionName?: string;
  statement?: string;
  querySummary?: string;
  queryText?: string;
  responseStatus?: string | number;
  rowsReturned?: number;
}
interface ServiceAttrs {
  name?: string;
  instance?: string;
  version?: string;
}
interface NetworkAttrs {
  protocolName?: string;
  protocolVersion?: string;
  peerAddress?: string;
  peerPort?: number;
  transport?: string;
  connectionId?: string;
}
interface ErrorAttrs {
  type?: string;
  message?: string;
  stackTrace?: string;
  code?: string | number;
}
interface FeatureFlagAttrs {
  key?: string;
  provider?: string;
  variant?: string;
}
interface MessagingAttrs {
  system?: string;
  destination?: string;
  operation?: 'publish' | 'receive' | 'process';
  messageId?: string;
  conversationId?: string;
}
interface CloudAttrs {
  provider?: string;
  accountId?: string;
  region?: string;
  availabilityZone?: string;
  platform?: string;
}
interface ServerAddressAttrs {
  address?: string;
  port?: number;
  socketAddress?: string;
}
interface URLAttrs {
  scheme?: string;
  full?: string;
  path?: string;
  query?: string;
  fragment?: string;
}
interface PeerAttrs {
  service?: string;
  address?: string;
  port?: number;
}
interface ProcessAttrs {
  pid?: number;
  executablePath?: string;
  command?: string;
  owner?: string;
}
interface ContainerAttrs {
  id?: string;
  name?: string;
  image?: string;
  tag?: string;
}
interface K8sAttrs {
  podName?: string;
  namespace?: string;
  deploymentName?: string;
  state?: string;
}
interface FaaSAttrs {
  name?: string;
  version?: string;
  instance?: string;
  execution?: string;
  coldstart?: boolean;
}
interface ThreadAttrs {
  id?: number;
  name?: string;
}
interface RPCAttrs {
  system?: string;
  service?: string;
  method?: string;
  message?: string;
}
interface GraphQLAttrs {
  document?: string;
  operationName?: string;
  type?: 'query' | 'mutation' | 'subscription';
}
interface ClientAttrs {
  address?: string;
  port?: number;
  socketAddress?: string;
}
interface DeploymentAttrs {
  environment?: string;
  id?: string;
}
interface OTelAttrs {
  libraryName?: string;
  libraryVersion?: string;
  schemaUrl?: string;
}
interface CodeAttrs {
  namespace?: string;
  filepath?: string;
  function?: string;
  class?: string;
  method?: string;
  repository?: string;
  revision?: string;
}
interface ExceptionAttrs {
  escaped?: boolean;
  message?: string;
  stackTrace?: string;
  type?: string;
  moduleName?: string;
}
interface TLSAttrs {
  protocolVersion?: string;
  cipher?: string;
  curveName?: string;
  resumed?: boolean;
}
//#endregion
//#region src/attributes/builders.d.ts
declare const attrs: {
  readonly user: {
    readonly id: (value: string) => {
      "user.id": string;
    };
    readonly email: (value: string) => {
      "user.email": string;
    };
    readonly name: (value: string) => {
      "user.name": string;
    };
    readonly fullName: (value: string) => {
      "user.full_name": string;
    };
    readonly hash: (value: string) => {
      "user.hash": string;
    };
    readonly roles: (value: string[]) => {
      "user.roles": string[];
    };
    readonly data: (data: UserAttrs) => Record<string, unknown>;
  };
  readonly session: {
    readonly id: (value: string) => {
      "session.id": string;
    };
    readonly previousId: (value: string) => {
      "session.previous_id": string;
    };
    readonly data: (data: SessionAttrs) => Record<string, unknown>;
  };
  readonly device: {
    readonly id: (value: string) => {
      "device.id": string;
    };
    readonly manufacturer: (value: string) => {
      "device.manufacturer": string;
    };
    readonly modelIdentifier: (value: string) => {
      "device.model.identifier": string;
    };
    readonly modelName: (value: string) => {
      "device.model.name": string;
    };
    readonly data: (data: DeviceAttrs) => Record<string, unknown>;
  };
  readonly http: {
    readonly request: {
      readonly method: (value: string) => {
        "http.request.method": string;
      };
      readonly methodOriginal: (value: string) => {
        "http.request.method_original": string;
      };
      readonly resendCount: (value: number) => {
        "http.request.resend_count": number;
      };
      readonly size: (value: number) => {
        "http.request.size": number;
      };
      readonly bodySize: (value: number) => {
        "http.request.body.size": number;
      };
    };
    readonly response: {
      readonly statusCode: (value: number) => {
        "http.response.status_code": number;
      };
      readonly size: (value: number) => {
        "http.response.size": number;
      };
      readonly bodySize: (value: number) => {
        "http.response.body.size": number;
      };
    };
    readonly route: (value: string) => {
      "http.route": string;
    };
    readonly connectionState: (value: string) => {
      "http.connection.state": string;
    };
    readonly server: (data: HTTPServerAttrs) => Record<string, unknown>;
    readonly client: (data: HTTPClientAttrs) => Record<string, unknown>;
  };
  readonly db: {
    readonly client: {
      readonly system: (value: string) => {
        "db.system.name": string;
      };
      readonly operation: (value: string) => {
        "db.operation.name": string;
      };
      readonly collectionName: (value: string) => {
        "db.collection.name": string;
      };
      readonly namespace: (value: string) => {
        "db.namespace": string;
      };
      readonly statement: (value: string) => {
        "db.statement": string;
      };
      readonly querySummary: (value: string) => {
        "db.query.summary": string;
      };
      readonly queryText: (value: string) => {
        "db.query.text": string;
      };
      readonly responseStatus: (value: string | number) => {
        "db.response.status_code": string | number;
      };
      readonly rowsReturned: (value: number) => {
        "db.response.returned_rows": number;
      };
      readonly data: (data: DBAttrs) => Record<string, unknown>;
    };
  };
  readonly service: {
    readonly name: (value: string) => {
      "service.name": string;
    };
    readonly instance: (value: string) => {
      "service.instance.id": string;
    };
    readonly version: (value: string) => {
      "service.version": string;
    };
    readonly data: (data: ServiceAttrs) => Record<string, unknown>;
  };
  readonly network: {
    readonly peerAddress: (value: string) => {
      "network.peer.address": string;
    };
    readonly peerPort: (value: number) => {
      "network.peer.port": number;
    };
    readonly transport: (value: string) => {
      "network.transport": string;
    };
    readonly protocolName: (value: string) => {
      "network.protocol.name": string;
    };
    readonly protocolVersion: (value: string) => {
      "network.protocol.version": string;
    };
    readonly data: (data: NetworkAttrs) => Record<string, unknown>;
  };
  readonly server: {
    readonly address: (value: string) => {
      "server.address": string;
    };
    readonly port: (value: number) => {
      "server.port": number;
    };
    readonly socketAddress: (value: string) => {
      "server.socket.address": string;
    };
    readonly data: (data: ServerAddressAttrs) => Record<string, unknown>;
  };
  readonly url: {
    readonly scheme: (value: string) => {
      "url.scheme": string;
    };
    readonly full: (value: string) => {
      "url.full": string;
    };
    readonly path: (value: string) => {
      "url.path": string;
    };
    readonly query: (value: string) => {
      "url.query": string;
    };
    readonly fragment: (value: string) => {
      "url.fragment": string;
    };
    readonly data: (data: URLAttrs) => Record<string, unknown>;
  };
  readonly error: {
    readonly type: (value: string) => {
      "error.type": string;
    };
    readonly message: (value: string) => {
      "error.message": string;
    };
    readonly stackTrace: (value: string) => {
      "error.stack": string;
    };
    readonly code: (value: string | number) => {
      "error.code": string | number;
    };
    readonly data: (data: ErrorAttrs) => Record<string, unknown>;
  };
  readonly exception: {
    readonly escaped: (value: boolean) => {
      "exception.escaped": boolean;
    };
    readonly message: (value: string) => {
      "exception.message": string;
    };
    readonly stackTrace: (value: string) => {
      "exception.stacktrace": string;
    };
    readonly type: (value: string) => {
      "exception.type": string;
    };
    readonly moduleName: (value: string) => {
      "exception.module": string;
    };
    readonly data: (data: ExceptionAttrs) => Record<string, unknown>;
  };
  readonly process: {
    readonly pid: (value: number) => {
      "process.pid": number;
    };
    readonly executablePath: (value: string) => {
      "process.executable.path": string;
    };
    readonly command: (value: string) => {
      "process.command": string;
    };
    readonly owner: (value: string) => {
      "process.owner": string;
    };
    readonly data: (data: ProcessAttrs) => Record<string, unknown>;
  };
  readonly thread: {
    readonly id: (value: number) => {
      "thread.id": number;
    };
    readonly name: (value: string) => {
      "thread.name": string;
    };
  };
  readonly container: {
    readonly id: (value: string) => {
      "container.id": string;
    };
    readonly name: (value: string) => {
      "container.name": string;
    };
    readonly image: (value: string) => {
      "container.image.name": string;
    };
    readonly tag: (value: string) => {
      "container.image.tag": string;
    };
    readonly data: (data: ContainerAttrs) => Record<string, unknown>;
  };
  readonly k8s: {
    readonly podName: (value: string) => {
      "k8s.pod.name": string;
    };
    readonly namespaceName: (value: string) => {
      "k8s.namespace.name": string;
    };
    readonly deploymentName: (value: string) => {
      "k8s.deployment.name": string;
    };
    readonly state: (value: string) => {
      "k8s.state.name": string;
    };
  };
  readonly cloud: {
    readonly provider: (value: string) => {
      "cloud.provider": string;
    };
    readonly accountId: (value: string) => {
      "cloud.account.id": string;
    };
    readonly region: (value: string) => {
      "cloud.region": string;
    };
    readonly availabilityZone: (value: string) => {
      "cloud.availability_zone": string;
    };
    readonly platform: (value: string) => {
      "cloud.platform": string;
    };
    readonly data: (data: CloudAttrs) => Record<string, unknown>;
  };
  readonly faas: {
    readonly name: (value: string) => {
      "faas.name": string;
    };
    readonly version: (value: string) => {
      "faas.version": string;
    };
    readonly instance: (value: string) => {
      "faas.instance": string;
    };
    readonly execution: (value: string) => {
      "faas.execution": string;
    };
    readonly coldstart: (value: boolean) => {
      "faas.coldstart": boolean;
    };
  };
  readonly featureFlag: {
    readonly key: (value: string) => {
      "feature.flag.key": string;
    };
    readonly provider: (value: string) => {
      "feature.flag.provider_name": string;
    };
    readonly variant: (value: string) => {
      "feature.flag.variant.name": string;
    };
  };
  readonly messaging: {
    readonly system: (value: string) => {
      "messaging.system": string;
    };
    readonly destination: (value: string) => {
      "messaging.destination.name": string;
    };
    readonly operation: (value: "publish" | "receive" | "process") => {
      "messaging.operation": "publish" | "receive" | "process";
    };
    readonly messageId: (value: string) => {
      "messaging.message.id": string;
    };
    readonly conversationId: (value: string) => {
      "messaging.conversation_id": string;
    };
    readonly data: (data: MessagingAttrs) => Record<string, unknown>;
  };
  readonly rpc: {
    readonly system: (value: string) => {
      "rpc.system": string;
    };
    readonly service: (value: string) => {
      "rpc.service": string;
    };
    readonly method: (value: string) => {
      "rpc.method": string;
    };
    readonly grpcStatusCode: (value: number) => {
      "rpc.grpc.status_code": number;
    };
  };
  readonly graphql: {
    readonly document: (value: string) => {
      "graphql.document": string;
    };
    readonly operationName: (value: string) => {
      "graphql.operation.name": string;
    };
    readonly operationType: (value: "query" | "mutation" | "subscription") => {
      "graphql.operation.type": "query" | "mutation" | "subscription";
    };
  };
  readonly otel: {
    readonly libraryName: (value: string) => {
      "otel.library.name": string;
    };
    readonly libraryVersion: (value: string) => {
      "otel.library.version": string;
    };
    readonly statusCode: (value: string) => {
      "otel.status_code": string;
    };
  };
  readonly code: {
    readonly namespace: (value: string) => {
      "code.namespace": string;
    };
    readonly filepath: (value: string) => {
      "code.filepath": string;
    };
    readonly function: (value: string) => {
      "code.function": string;
    };
    readonly class: (value: string) => {
      "code.class": string;
    };
    readonly method: (value: string) => {
      "code.method": string;
    };
    readonly column: (value: string) => {
      "code.column": string;
    };
    readonly lineNumber: (value: number) => {
      "code.lineno": number;
    };
    readonly repository: (value: string) => {
      "code.repository": string;
    };
    readonly revision: (value: string) => {
      "code.revision": string;
    };
  };
  readonly tls: {
    readonly protocolVersion: (value: string) => {
      "tls.protocol.version": string;
    };
    readonly cipher: (value: string) => {
      "tls.cipher": string;
    };
    readonly curveName: (value: string) => {
      "tls.curve.name": string;
    };
    readonly resumed: (value: boolean) => {
      "tls.resumed": boolean;
    };
  };
};
//#endregion
//#region src/attributes/validators.d.ts
/**
 * Attribute validation, PII detection, and guardrails
 * Provides safe-by-default attribute handling with configurable policies
 */
interface AttributeGuardrails {
  /** How to handle PII in attributes */
  pii?: 'allow' | 'redact' | 'hash' | 'block';
  /** Maximum length for attribute values */
  maxLength?: number;
  /** Validate enum values against known values */
  validateEnum?: boolean;
  /** Log warnings for deprecated attributes instead of throwing */
  warnDeprecated?: boolean;
  /** Custom deprecation warnings */
  deprecatedWarnings?: Record<string, string>;
}
interface AttributePolicy {
  guardrails?: AttributeGuardrails;
  /** Custom deprecation warnings for specific attributes */
  deprecatedWarnings?: Record<string, string>;
}
declare function validateAttribute(key: string, value: unknown, policy?: AttributePolicy): unknown;
declare function checkDeprecatedAttribute(key: string, policy?: AttributePolicy): string | null;
declare function autoRedactPII(attributes: Record<string, unknown>, policy?: AttributePolicy): Record<string, unknown>;
declare function defaultGuardrails(): AttributeGuardrails;
//#endregion
//#region src/attributes/attachers.d.ts
declare function setUser(spanOrContext: Span | TraceContext, data: UserAttrs, guardrails?: AttributePolicy): void;
declare function setSession(spanOrContext: Span | TraceContext, data: SessionAttrs, guardrails?: AttributePolicy): void;
declare function setDevice(spanOrContext: Span | TraceContext, data: DeviceAttrs, guardrails?: AttributePolicy): void;
declare function httpServer(spanOrContext: Span | TraceContext, data: HTTPServerAttrs, guardrails?: AttributePolicy): void;
declare function httpClient(spanOrContext: Span | TraceContext, data: HTTPClientAttrs, guardrails?: AttributePolicy): void;
declare function dbClient(spanOrContext: Span | TraceContext, data: DBAttrs, guardrails?: AttributePolicy): void;
/**
 * Merge service attributes into a Resource and return a new Resource.
 *
 * Resource.attributes is readonly, so this function returns a new merged
 * Resource rather than mutating the input.
 *
 * @param resource - The existing resource to merge with
 * @param data - Service attributes to add
 * @returns A new Resource with the merged attributes
 *
 * @example
 * ```typescript
 * const baseResource = Resource.default();
 * const enrichedResource = mergeServiceResource(baseResource, {
 *   name: 'my-service',
 *   version: '1.0.0',
 * });
 * ```
 */
declare function mergeServiceResource(resource: Resource, data: ServiceAttrs): Resource;
declare function identify(spanOrContext: Span | TraceContext, data: {
  user?: UserAttrs;
  session?: SessionAttrs;
  device?: DeviceAttrs;
}, guardrails?: AttributePolicy): void;
declare function request(spanOrContext: Span | TraceContext, data: HTTPServerAttrs & {
  clientIp?: string;
}, guardrails?: AttributePolicy): void;
declare function setError(spanOrContext: Span | TraceContext, data: ErrorAttrs, guardrails?: AttributePolicy): void;
declare function setException(spanOrContext: Span | TraceContext, data: ExceptionAttrs, guardrails?: AttributePolicy): void;
//#endregion
//#region src/attributes/domains.d.ts
/**
 * Domain helpers for common attribute patterns
 * These bundle multiple attribute groups into semantic helpers
 */
declare function transaction(spanOrContext: TraceContext, config: {
  user?: UserAttrs;
  session?: SessionAttrs;
  method?: string;
  route?: string;
  statusCode?: number;
  clientIp?: string;
}, guardrails?: AttributePolicy): void;
//#endregion
//#region src/attributes/utils.d.ts
type AttributeSetter = {
  setAttributes: (attrs: Record<string, AttributeValue$1>) => void;
};
declare function mergeAttrs(...attrSets: Array<Record<string, unknown> | undefined>): Record<string, unknown>;
declare function safeSetAttributes(span: AttributeSetter, attrs: Record<string, unknown>, policy?: AttributePolicy): void;
//#endregion
export { ExceptionAttrs as A, PeerAttrs as B, CloudAttrs as C, DeploymentAttrs as D, DBAttrs as E, HTTPServerAttrs as F, SessionAttrs as G, RPCAttrs as H, K8sAttrs as I, URLAttrs as J, TLSAttrs as K, MessagingAttrs as L, FeatureFlagAttrs as M, GraphQLAttrs as N, DeviceAttrs as O, HTTPClientAttrs as P, NetworkAttrs as R, ClientAttrs as S, ContainerAttrs as T, ServerAddressAttrs as U, ProcessAttrs as V, ServiceAttrs as W, UserAttrs as Y, autoRedactPII as _, httpClient as a, validateAttribute as b, mergeServiceResource as c, setError as d, setException as f, AttributePolicy as g, AttributeGuardrails as h, dbClient as i, FaaSAttrs as j, ErrorAttrs as k, request as l, setUser as m, safeSetAttributes as n, httpServer as o, setSession as p, ThreadAttrs as q, transaction as r, identify as s, mergeAttrs as t, setDevice as u, checkDeprecatedAttribute as v, CodeAttrs as w, attrs as x, defaultGuardrails as y, OTelAttrs as z };
//# sourceMappingURL=index-eKuioqT1.d.cts.map