autotel 3.7.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attributes-ksn4HVbd.js → attributes-CmYpdqCN.js} +2 -11
- package/dist/attributes-CmYpdqCN.js.map +1 -0
- package/dist/{attributes-D3etyRVc.cjs → attributes-PZ5doLgw.cjs} +2 -11
- package/dist/attributes-PZ5doLgw.cjs.map +1 -0
- package/dist/attributes.cjs +1 -1
- package/dist/attributes.d.cts +2 -2
- package/dist/attributes.d.ts +2 -2
- package/dist/attributes.js +1 -1
- package/dist/{index-CX0aG1Uh.d.ts → index-Ck06vlW2.d.ts} +2 -32
- package/dist/index-Ck06vlW2.d.ts.map +1 -0
- package/dist/{index-DIWZFKUS.d.cts → index-eKuioqT1.d.cts} +2 -32
- package/dist/index-eKuioqT1.d.cts.map +1 -0
- package/dist/index.cjs +2 -346
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -171
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +3 -171
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -333
- package/dist/index.js.map +1 -1
- package/dist/{registry-DfXA3R1L.js → registry-DVSmWg6Y.js} +2 -11
- package/dist/registry-DVSmWg6Y.js.map +1 -0
- package/dist/{registry-JZg2J3RZ.cjs → registry-DYgvb62e.cjs} +1 -16
- package/dist/registry-DYgvb62e.cjs.map +1 -0
- package/dist/semantic-conventions.cjs +1 -1
- package/dist/semantic-conventions.js +1 -1
- package/dist/semantic-helpers.cjs +0 -113
- package/dist/semantic-helpers.cjs.map +1 -1
- package/dist/semantic-helpers.d.cts +1 -114
- package/dist/semantic-helpers.d.cts.map +1 -1
- package/dist/semantic-helpers.d.ts +1 -114
- package/dist/semantic-helpers.d.ts.map +1 -1
- package/dist/semantic-helpers.js +1 -113
- package/dist/semantic-helpers.js.map +1 -1
- package/package.json +1 -1
- package/skills/analyze-traces/SKILL.md +14 -12
- package/skills/review-otel-patterns/SKILL.md +4 -2
- package/skills/tune-sampling/SKILL.md +8 -3
- package/src/attributes/builders.ts +2 -20
- package/src/attributes/index.ts +0 -1
- package/src/attributes/registry.ts +2 -9
- package/src/attributes/types.ts +0 -8
- package/src/index.ts +4 -41
- package/src/semantic-helpers.test.ts +2 -87
- package/src/semantic-helpers.ts +0 -146
- package/dist/attributes-D3etyRVc.cjs.map +0 -1
- package/dist/attributes-ksn4HVbd.js.map +0 -1
- package/dist/index-CX0aG1Uh.d.ts.map +0 -1
- package/dist/index-DIWZFKUS.d.cts.map +0 -1
- package/dist/registry-DfXA3R1L.js.map +0 -1
- package/dist/registry-JZg2J3RZ.cjs.map +0 -1
- package/src/gen-ai-cost.test.ts +0 -81
- package/src/gen-ai-cost.ts +0 -145
- package/src/gen-ai-events.test.ts +0 -135
- package/src/gen-ai-events.ts +0 -208
- package/src/gen-ai-metrics.test.ts +0 -96
- package/src/gen-ai-metrics.ts +0 -128
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes-ksn4HVbd.js","names":[],"sources":["../src/attributes/builders.ts","../src/attributes/validators.ts","../src/attributes/utils.ts","../src/attributes/attachers.ts","../src/attributes/domains.ts"],"sourcesContent":["/**\n * Attribute builders for constructing OpenTelemetry attributes\n * Provides both key builders (Pattern A) and object builders (Pattern B)\n *\n * @example Pattern A: Key builders\n * ```typescript\n * attrs.user.id('123') // { 'user.id': '123' }\n * attrs.user.email('user@example.com') // { 'user.email': 'user@example.com' }\n * attrs.http.request.method('GET') // { 'http.request.method': 'GET' }\n * attrs.http.response.statusCode(200) // { 'http.response.status_code': 200 }\n * ```\n *\n * @example Pattern B: Object builders\n * ```typescript\n * attrs.user({ id: '123', email: 'user@example.com' })\n * attrs.http.server({ method: 'GET', route: '/users/:id', statusCode: 200 })\n * attrs.db.client({ system: 'postgresql', operation: 'SELECT', collectionName: 'users' })\n * ```\n */\n\nimport {\n UserAttributes,\n SessionAttributes,\n DeviceAttributes,\n HTTPAttributes,\n DBAttributes,\n ServiceAttributes,\n NetworkAttributes,\n ServerAddressAttributes,\n URLAttributes,\n ErrorAttributes,\n ExceptionAttributes,\n ProcessAttributes,\n ThreadAttributes,\n ContainerAttributes,\n K8sAttributes,\n CloudAttributes,\n FaaSAttributes,\n FeatureFlagAttributes,\n MessagingAttributes,\n GenAIAttributes,\n RPCAttributes,\n GraphQLAttributes,\n OTelAttributes,\n CodeAttributes,\n TLSAttributes,\n} from './registry';\n\nimport type {\n UserAttrs,\n SessionAttrs,\n DeviceAttrs,\n HTTPServerAttrs,\n HTTPClientAttrs,\n DBAttrs,\n ServiceAttrs,\n NetworkAttrs,\n ErrorAttrs,\n MessagingAttrs,\n CloudAttrs,\n ServerAddressAttrs,\n URLAttrs,\n ProcessAttrs,\n ContainerAttrs,\n ExceptionAttrs,\n} from './types';\n\nexport const attrs = {\n user: {\n id: (value: string) => ({ [UserAttributes.id]: value }),\n email: (value: string) => ({ [UserAttributes.email]: value }),\n name: (value: string) => ({ [UserAttributes.name]: value }),\n fullName: (value: string) => ({ [UserAttributes.fullName]: value }),\n hash: (value: string) => ({ [UserAttributes.hash]: value }),\n roles: (value: string[]) => ({ [UserAttributes.roles]: value }),\n\n data: (data: UserAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.id !== undefined) result[UserAttributes.id] = data.id;\n if (data.email !== undefined) result[UserAttributes.email] = data.email;\n if (data.name !== undefined) result[UserAttributes.name] = data.name;\n if (data.fullName !== undefined)\n result[UserAttributes.fullName] = data.fullName;\n if (data.hash !== undefined) result[UserAttributes.hash] = data.hash;\n if (data.roles !== undefined) result[UserAttributes.roles] = data.roles;\n return result;\n },\n },\n\n session: {\n id: (value: string) => ({ [SessionAttributes.id]: value }),\n previousId: (value: string) => ({ [SessionAttributes.previousId]: value }),\n\n data: (data: SessionAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.id !== undefined) result[SessionAttributes.id] = data.id;\n if (data.previousId !== undefined)\n result[SessionAttributes.previousId] = data.previousId;\n return result;\n },\n },\n\n device: {\n id: (value: string) => ({ [DeviceAttributes.id]: value }),\n manufacturer: (value: string) => ({\n [DeviceAttributes.manufacturer]: value,\n }),\n modelIdentifier: (value: string) => ({\n [DeviceAttributes.modelIdentifier]: value,\n }),\n modelName: (value: string) => ({ [DeviceAttributes.modelName]: value }),\n\n data: (data: DeviceAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.id !== undefined) result[DeviceAttributes.id] = data.id;\n if (data.manufacturer !== undefined)\n result[DeviceAttributes.manufacturer] = data.manufacturer;\n if (data.modelIdentifier !== undefined)\n result[DeviceAttributes.modelIdentifier] = data.modelIdentifier;\n if (data.modelName !== undefined)\n result[DeviceAttributes.modelName] = data.modelName;\n return result;\n },\n },\n\n http: {\n request: {\n method: (value: string) => ({ [HTTPAttributes.requestMethod]: value }),\n methodOriginal: (value: string) => ({\n [HTTPAttributes.requestMethodOriginal]: value,\n }),\n resendCount: (value: number) => ({\n [HTTPAttributes.requestResendCount]: value,\n }),\n size: (value: number) => ({ [HTTPAttributes.requestSize]: value }),\n bodySize: (value: number) => ({\n [HTTPAttributes.requestBodySize]: value,\n }),\n },\n\n response: {\n statusCode: (value: number) => ({\n [HTTPAttributes.responseStatusCode]: value,\n }),\n size: (value: number) => ({ [HTTPAttributes.responseSize]: value }),\n bodySize: (value: number) => ({\n [HTTPAttributes.responseBodySize]: value,\n }),\n },\n\n route: (value: string) => ({ [HTTPAttributes.route]: value }),\n connectionState: (value: string) => ({\n [HTTPAttributes.connectionState]: value,\n }),\n\n server: (data: HTTPServerAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.method !== undefined)\n result[HTTPAttributes.requestMethod] = data.method;\n if (data.route !== undefined) result[HTTPAttributes.route] = data.route;\n if (data.statusCode !== undefined)\n result[HTTPAttributes.responseStatusCode] = data.statusCode;\n if (data.bodySize !== undefined)\n result[HTTPAttributes.requestBodySize] = data.bodySize;\n if (data.requestSize !== undefined)\n result[HTTPAttributes.requestSize] = data.requestSize;\n if (data.responseSize !== undefined)\n result[HTTPAttributes.responseSize] = data.responseSize;\n if (data.resendCount !== undefined)\n result[HTTPAttributes.requestResendCount] = data.resendCount;\n return result;\n },\n\n client: (data: HTTPClientAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.method !== undefined)\n result[HTTPAttributes.requestMethod] = data.method;\n if (data.url !== undefined) result[HTTPAttributes.route] = data.url;\n if (data.statusCode !== undefined)\n result[HTTPAttributes.responseStatusCode] = data.statusCode;\n return result;\n },\n },\n\n db: {\n client: {\n system: (value: string) => ({ [DBAttributes.systemName]: value }),\n operation: (value: string) => ({ [DBAttributes.operationName]: value }),\n collectionName: (value: string) => ({\n [DBAttributes.collectionName]: value,\n }),\n namespace: (value: string) => ({ [DBAttributes.namespace]: value }),\n statement: (value: string) => ({ [DBAttributes.statement]: value }),\n querySummary: (value: string) => ({ [DBAttributes.querySummary]: value }),\n queryText: (value: string) => ({ [DBAttributes.queryText]: value }),\n responseStatus: (value: string | number) => ({\n [DBAttributes.responseStatusCode]: value,\n }),\n rowsReturned: (value: number) => ({\n [DBAttributes.responseReturnedRows]: value,\n }),\n\n data: (data: DBAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.system !== undefined)\n result[DBAttributes.systemName] = data.system;\n if (data.operation !== undefined)\n result[DBAttributes.operationName] = data.operation;\n if (data.collectionName !== undefined)\n result[DBAttributes.collectionName] = data.collectionName;\n // 'name' maps to db.namespace (db.name is deprecated per OTel semantic conventions)\n if (data.name !== undefined) result[DBAttributes.namespace] = data.name;\n // 'namespace' takes precedence over 'name' if both are provided\n if (data.namespace !== undefined)\n result[DBAttributes.namespace] = data.namespace;\n if (data.statement !== undefined)\n result[DBAttributes.statement] = data.statement;\n if (data.querySummary !== undefined)\n result[DBAttributes.querySummary] = data.querySummary;\n if (data.queryText !== undefined)\n result[DBAttributes.queryText] = data.queryText;\n if (data.responseStatus !== undefined)\n result[DBAttributes.responseStatusCode] = data.responseStatus;\n if (data.rowsReturned !== undefined)\n result[DBAttributes.responseReturnedRows] = data.rowsReturned;\n return result;\n },\n },\n },\n\n service: {\n name: (value: string) => ({ [ServiceAttributes.name]: value }),\n instance: (value: string) => ({ [ServiceAttributes.instance]: value }),\n version: (value: string) => ({ [ServiceAttributes.version]: value }),\n\n data: (data: ServiceAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.name !== undefined) result[ServiceAttributes.name] = data.name;\n if (data.instance !== undefined)\n result[ServiceAttributes.instance] = data.instance;\n if (data.version !== undefined)\n result[ServiceAttributes.version] = data.version;\n return result;\n },\n },\n\n network: {\n peerAddress: (value: string) => ({\n [NetworkAttributes.peerAddress]: value,\n }),\n peerPort: (value: number) => ({ [NetworkAttributes.peerPort]: value }),\n transport: (value: string) => ({ [NetworkAttributes.transport]: value }),\n protocolName: (value: string) => ({\n [NetworkAttributes.protocolName]: value,\n }),\n protocolVersion: (value: string) => ({\n [NetworkAttributes.protocolVersion]: value,\n }),\n\n data: (data: NetworkAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.peerAddress !== undefined)\n result[NetworkAttributes.peerAddress] = data.peerAddress;\n if (data.peerPort !== undefined)\n result[NetworkAttributes.peerPort] = data.peerPort;\n if (data.transport !== undefined)\n result[NetworkAttributes.transport] = data.transport;\n if (data.protocolName !== undefined)\n result[NetworkAttributes.protocolName] = data.protocolName;\n if (data.protocolVersion !== undefined)\n result[NetworkAttributes.protocolVersion] = data.protocolVersion;\n return result;\n },\n },\n\n server: {\n address: (value: string) => ({ [ServerAddressAttributes.address]: value }),\n port: (value: number) => ({ [ServerAddressAttributes.port]: value }),\n socketAddress: (value: string) => ({\n [ServerAddressAttributes.socketAddress]: value,\n }),\n\n data: (data: ServerAddressAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.address !== undefined)\n result[ServerAddressAttributes.address] = data.address;\n if (data.port !== undefined)\n result[ServerAddressAttributes.port] = data.port;\n if (data.socketAddress !== undefined)\n result[ServerAddressAttributes.socketAddress] = data.socketAddress;\n return result;\n },\n },\n\n url: {\n scheme: (value: string) => ({ [URLAttributes.scheme]: value }),\n full: (value: string) => ({ [URLAttributes.full]: value }),\n path: (value: string) => ({ [URLAttributes.path]: value }),\n query: (value: string) => ({ [URLAttributes.query]: value }),\n fragment: (value: string) => ({ [URLAttributes.fragment]: value }),\n\n data: (data: URLAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.scheme !== undefined) result[URLAttributes.scheme] = data.scheme;\n if (data.full !== undefined) result[URLAttributes.full] = data.full;\n if (data.path !== undefined) result[URLAttributes.path] = data.path;\n if (data.query !== undefined) result[URLAttributes.query] = data.query;\n if (data.fragment !== undefined)\n result[URLAttributes.fragment] = data.fragment;\n return result;\n },\n },\n\n error: {\n type: (value: string) => ({ [ErrorAttributes.type]: value }),\n message: (value: string) => ({ [ErrorAttributes.message]: value }),\n stackTrace: (value: string) => ({ [ErrorAttributes.stackTrace]: value }),\n code: (value: string | number) => ({ [ErrorAttributes.code]: value }),\n\n data: (data: ErrorAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.type !== undefined) result[ErrorAttributes.type] = data.type;\n if (data.message !== undefined)\n result[ErrorAttributes.message] = data.message;\n if (data.stackTrace !== undefined)\n result[ErrorAttributes.stackTrace] = data.stackTrace;\n if (data.code !== undefined) result[ErrorAttributes.code] = data.code;\n return result;\n },\n },\n\n exception: {\n escaped: (value: boolean) => ({ [ExceptionAttributes.escaped]: value }),\n message: (value: string) => ({ [ExceptionAttributes.message]: value }),\n stackTrace: (value: string) => ({\n [ExceptionAttributes.stackTrace]: value,\n }),\n type: (value: string) => ({ [ExceptionAttributes.type]: value }),\n moduleName: (value: string) => ({\n [ExceptionAttributes.moduleName]: value,\n }),\n\n data: (data: ExceptionAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.escaped !== undefined)\n result[ExceptionAttributes.escaped] = data.escaped;\n if (data.message !== undefined)\n result[ExceptionAttributes.message] = data.message;\n if (data.stackTrace !== undefined)\n result[ExceptionAttributes.stackTrace] = data.stackTrace;\n if (data.type !== undefined) result[ExceptionAttributes.type] = data.type;\n if (data.moduleName !== undefined)\n result[ExceptionAttributes.moduleName] = data.moduleName;\n return result;\n },\n },\n\n process: {\n pid: (value: number) => ({ [ProcessAttributes.pid]: value }),\n executablePath: (value: string) => ({\n [ProcessAttributes.executablePath]: value,\n }),\n command: (value: string) => ({ [ProcessAttributes.command]: value }),\n owner: (value: string) => ({ [ProcessAttributes.owner]: value }),\n\n data: (data: ProcessAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.pid !== undefined) result[ProcessAttributes.pid] = data.pid;\n if (data.executablePath !== undefined)\n result[ProcessAttributes.executablePath] = data.executablePath;\n if (data.command !== undefined)\n result[ProcessAttributes.command] = data.command;\n if (data.owner !== undefined)\n result[ProcessAttributes.owner] = data.owner;\n return result;\n },\n },\n\n thread: {\n id: (value: number) => ({ [ThreadAttributes.id]: value }),\n name: (value: string) => ({ [ThreadAttributes.name]: value }),\n },\n\n container: {\n id: (value: string) => ({ [ContainerAttributes.id]: value }),\n name: (value: string) => ({ [ContainerAttributes.name]: value }),\n image: (value: string) => ({ [ContainerAttributes.image]: value }),\n tag: (value: string) => ({ [ContainerAttributes.tag]: value }),\n\n data: (data: ContainerAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.id !== undefined) result[ContainerAttributes.id] = data.id;\n if (data.name !== undefined) result[ContainerAttributes.name] = data.name;\n if (data.image !== undefined)\n result[ContainerAttributes.image] = data.image;\n if (data.tag !== undefined) result[ContainerAttributes.tag] = data.tag;\n return result;\n },\n },\n\n k8s: {\n podName: (value: string) => ({ [K8sAttributes.podName]: value }),\n namespaceName: (value: string) => ({\n [K8sAttributes.namespaceName]: value,\n }),\n deploymentName: (value: string) => ({\n [K8sAttributes.deploymentName]: value,\n }),\n state: (value: string) => ({ [K8sAttributes.state]: value }),\n },\n\n cloud: {\n provider: (value: string) => ({ [CloudAttributes.provider]: value }),\n accountId: (value: string) => ({ [CloudAttributes.accountId]: value }),\n region: (value: string) => ({ [CloudAttributes.region]: value }),\n availabilityZone: (value: string) => ({\n [CloudAttributes.availabilityZone]: value,\n }),\n platform: (value: string) => ({ [CloudAttributes.platform]: value }),\n\n data: (data: CloudAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.provider !== undefined)\n result[CloudAttributes.provider] = data.provider;\n if (data.accountId !== undefined)\n result[CloudAttributes.accountId] = data.accountId;\n if (data.region !== undefined)\n result[CloudAttributes.region] = data.region;\n if (data.availabilityZone !== undefined)\n result[CloudAttributes.availabilityZone] = data.availabilityZone;\n if (data.platform !== undefined)\n result[CloudAttributes.platform] = data.platform;\n return result;\n },\n },\n\n faas: {\n name: (value: string) => ({ [FaaSAttributes.name]: value }),\n version: (value: string) => ({ [FaaSAttributes.version]: value }),\n instance: (value: string) => ({ [FaaSAttributes.instance]: value }),\n execution: (value: string) => ({ [FaaSAttributes.execution]: value }),\n coldstart: (value: boolean) => ({ [FaaSAttributes.coldstart]: value }),\n },\n\n featureFlag: {\n key: (value: string) => ({ [FeatureFlagAttributes.key]: value }),\n provider: (value: string) => ({ [FeatureFlagAttributes.provider]: value }),\n variant: (value: string) => ({ [FeatureFlagAttributes.variant]: value }),\n },\n\n messaging: {\n system: (value: string) => ({ [MessagingAttributes.system]: value }),\n destination: (value: string) => ({\n [MessagingAttributes.destination]: value,\n }),\n operation: (value: 'publish' | 'receive' | 'process') => ({\n [MessagingAttributes.operation]: value,\n }),\n messageId: (value: string) => ({ [MessagingAttributes.messageId]: value }),\n conversationId: (value: string) => ({\n [MessagingAttributes.conversationId]: value,\n }),\n\n data: (data: MessagingAttrs) => {\n const result: Record<string, unknown> = {};\n if (data.system !== undefined)\n result[MessagingAttributes.system] = data.system;\n if (data.destination !== undefined)\n result[MessagingAttributes.destination] = data.destination;\n if (data.operation !== undefined)\n result[MessagingAttributes.operation] = data.operation;\n if (data.messageId !== undefined)\n result[MessagingAttributes.messageId] = data.messageId;\n if (data.conversationId !== undefined)\n result[MessagingAttributes.conversationId] = data.conversationId;\n return result;\n },\n },\n\n genAI: {\n system: (value: string) => ({ [GenAIAttributes.system]: value }),\n requestModel: (value: string) => ({\n [GenAIAttributes.requestModel]: value,\n }),\n responseModel: (value: string) => ({\n [GenAIAttributes.responseModel]: value,\n }),\n operationName: (value: 'chat' | 'completion' | 'embedding') => ({\n [GenAIAttributes.operationName]: value,\n }),\n usagePromptTokens: (value: number) => ({\n [GenAIAttributes.usagePromptTokens]: value,\n }),\n usageCompletionTokens: (value: number) => ({\n [GenAIAttributes.usageCompletionTokens]: value,\n }),\n provider: (value: string) => ({ [GenAIAttributes.provider]: value }),\n },\n\n rpc: {\n system: (value: string) => ({ [RPCAttributes.system]: value }),\n service: (value: string) => ({ [RPCAttributes.service]: value }),\n method: (value: string) => ({ [RPCAttributes.method]: value }),\n grpcStatusCode: (value: number) => ({\n [RPCAttributes.grpcStatusCode]: value,\n }),\n },\n\n graphql: {\n document: (value: string) => ({ [GraphQLAttributes.document]: value }),\n operationName: (value: string) => ({\n [GraphQLAttributes.operationName]: value,\n }),\n operationType: (value: 'query' | 'mutation' | 'subscription') => ({\n [GraphQLAttributes.operationType]: value,\n }),\n },\n\n otel: {\n libraryName: (value: string) => ({ [OTelAttributes.libraryName]: value }),\n libraryVersion: (value: string) => ({\n [OTelAttributes.libraryVersion]: value,\n }),\n statusCode: (value: string) => ({ [OTelAttributes.statusCode]: value }),\n },\n\n code: {\n namespace: (value: string) => ({ [CodeAttributes.namespace]: value }),\n filepath: (value: string) => ({ [CodeAttributes.filepath]: value }),\n function: (value: string) => ({ [CodeAttributes.function]: value }),\n class: (value: string) => ({ [CodeAttributes.class]: value }),\n method: (value: string) => ({ [CodeAttributes.method]: value }),\n column: (value: string) => ({ [CodeAttributes.column]: value }),\n lineNumber: (value: number) => ({ [CodeAttributes.lineNumber]: value }),\n repository: (value: string) => ({ [CodeAttributes.repository]: value }),\n revision: (value: string) => ({ [CodeAttributes.revision]: value }),\n },\n\n tls: {\n protocolVersion: (value: string) => ({\n [TLSAttributes.protocolVersion]: value,\n }),\n cipher: (value: string) => ({ [TLSAttributes.cipher]: value }),\n curveName: (value: string) => ({ [TLSAttributes.curveName]: value }),\n resumed: (value: boolean) => ({ [TLSAttributes.resumed]: value }),\n },\n} as const;\n","/**\n * Attribute validation, PII detection, and guardrails\n * Provides safe-by-default attribute handling with configurable policies\n */\n\nimport { REDACTOR_PATTERNS } from '../attribute-redacting-processor';\n\nexport interface AttributeGuardrails {\n /** How to handle PII in attributes */\n pii?: 'allow' | 'redact' | 'hash' | 'block';\n\n /** Maximum length for attribute values */\n maxLength?: number;\n\n /** Validate enum values against known values */\n validateEnum?: boolean;\n\n /** Log warnings for deprecated attributes instead of throwing */\n warnDeprecated?: boolean;\n\n /** Custom deprecation warnings */\n deprecatedWarnings?: Record<string, string>;\n}\n\nexport interface AttributePolicy {\n guardrails?: AttributeGuardrails;\n /** Custom deprecation warnings for specific attributes */\n deprecatedWarnings?: Record<string, string>;\n}\n\nconst DEPRECATED_ATTRIBUTES = {\n 'enduser.id': 'user.id',\n 'enduser.role': 'user.roles',\n 'enduser.scope': undefined,\n 'http.method': 'http.request.method',\n 'http.host': 'server.address',\n 'http.status_code': 'http.response.status_code',\n 'http.target': 'url.path',\n 'http.url': 'url.full',\n 'http.user_agent': 'user_agent.original',\n 'http.flavor': 'network.protocol.name',\n 'http.scheme': 'url.scheme',\n 'http.server_name': 'server.address',\n 'db.name': 'db.namespace',\n 'db.operation': 'db.operation.name',\n 'db.statement': 'db.query.text',\n 'db.system': 'db.system.name',\n 'db.collection': 'db.collection.name',\n 'db.instance.id': undefined,\n 'db.jdbc.driver_classname': undefined,\n 'db.mssql.instance_name': 'mssql.instance.name',\n 'db.sql.table': 'db.collection.name',\n 'http.client_ip': 'client.address',\n 'user_agent.original': 'user_agent.original',\n} as const;\n\nconst HTTP_METHODS = new Set([\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'PATCH',\n 'HEAD',\n 'OPTIONS',\n 'TRACE',\n 'QUERY',\n '_OTHER',\n]);\n\nexport function validateAttribute(\n key: string,\n value: unknown,\n policy: AttributePolicy = {},\n): unknown {\n const { guardrails = {} } = policy;\n\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // For non-string values that don't need transformation, preserve the original type\n if (typeof value !== 'string') {\n // PII checks only apply to strings\n // maxLength only applies to strings\n // validateEnum only applies to strings\n return value;\n }\n\n const stringValue = value;\n\n if (guardrails.pii) {\n const piiResult = applyPIIPolicy(key, stringValue, guardrails.pii);\n if (piiResult !== stringValue) {\n return piiResult;\n }\n }\n\n if (guardrails.maxLength && stringValue.length > guardrails.maxLength) {\n return truncateValue(key, stringValue, guardrails.maxLength);\n }\n\n if (guardrails.validateEnum && HTTP_METHODS.has(stringValue)) {\n const normalizedMethod = normalizeHTTPMethod(stringValue);\n if (normalizedMethod !== stringValue) {\n return normalizedMethod;\n }\n }\n\n return stringValue;\n}\n\nfunction applyPIIPolicy(\n key: string,\n value: string,\n pii: AttributeGuardrails['pii'],\n): string {\n if (pii === 'allow') {\n return value;\n }\n\n if (pii === 'redact') {\n return redactIfPII(key, value);\n }\n\n if (pii === 'hash') {\n return hashIfPII(key, value);\n }\n\n if (pii === 'block' && isPIIKey(key)) {\n throw new Error(\n `PII attribute \"${key}\" is blocked by guardrails. Use pii: \"allow\" to enable it.`,\n );\n }\n\n return value;\n}\n\nfunction isPIIKey(key: string): boolean {\n const piiKeyPatterns = [\n 'email',\n 'phone',\n 'ssn',\n 'credit_card',\n 'password',\n 'secret',\n 'token',\n 'api_key',\n 'authorization',\n ];\n const lowerKey = key.toLowerCase();\n return piiKeyPatterns.some((pattern) => lowerKey.includes(pattern));\n}\n\nfunction redactIfPII(key: string, value: string): string {\n if (isPIIKey(key)) {\n // REDACTOR_PATTERNS values are RegExp patterns\n for (const [, pattern] of Object.entries(REDACTOR_PATTERNS)) {\n if (pattern instanceof RegExp && pattern.test(value)) {\n return '[REDACTED]';\n }\n }\n // If no pattern matched but key is PII, still redact\n return '[REDACTED]';\n }\n return value;\n}\n\nfunction hashIfPII(key: string, value: string): string {\n if (!isPIIKey(key)) {\n return value;\n }\n\n // Use a simple but consistent hash that produces 32-char hex\n // FNV-1a hash variant producing 128-bit output (32 hex chars)\n const FNV_PRIME = 0x01_00_01_93;\n const FNV_OFFSET = 0x81_1c_9d_c5;\n\n // Generate 4 32-bit hashes to produce 32 hex chars\n const hashes: number[] = [];\n for (let round = 0; round < 4; round++) {\n let hash = FNV_OFFSET;\n for (let i = 0; i < value.length; i++) {\n hash ^= (value.codePointAt(i) ?? 0) + round;\n hash = Math.imul(hash, FNV_PRIME);\n }\n hashes.push(hash >>> 0); // Convert to unsigned\n }\n\n return `hash_${hashes.map((h) => h.toString(16).padStart(8, '0')).join('')}`;\n}\n\nfunction truncateValue(key: string, value: string, maxLength: number): string {\n if (value.length <= maxLength) {\n return value;\n }\n return value.slice(0, maxLength - 3) + '...';\n}\n\nfunction normalizeHTTPMethod(method: string): string {\n const upper = method.toUpperCase();\n if (HTTP_METHODS.has(upper)) {\n return upper;\n }\n return upper;\n}\n\nexport function checkDeprecatedAttribute(\n key: string,\n policy: AttributePolicy = {},\n): string | null {\n const { guardrails = {}, deprecatedWarnings = {} } = policy;\n const { warnDeprecated = true } = guardrails;\n\n if (!warnDeprecated) {\n return null;\n }\n\n // Check if the key exists in the deprecated attributes map\n const isDeprecated = key in DEPRECATED_ATTRIBUTES;\n if (isDeprecated) {\n const replacement =\n DEPRECATED_ATTRIBUTES[key as keyof typeof DEPRECATED_ATTRIBUTES];\n if (replacement === undefined) {\n // Deprecated with no replacement (e.g., enduser.scope)\n console.warn(\n `[autotel/attributes] Attribute \"${key}\" is deprecated and has no replacement. ` +\n `Remove or find a replacement in OpenTelemetry semantic conventions.`,\n );\n } else {\n // Deprecated with a known replacement\n console.warn(\n `[autotel/attributes] Attribute \"${key}\" is deprecated. Use \"${replacement}\" instead.`,\n );\n }\n }\n\n if (deprecatedWarnings[key]) {\n console.warn(`[autotel/attributes] ${deprecatedWarnings[key]}`);\n }\n\n const replacement =\n DEPRECATED_ATTRIBUTES[key as keyof typeof DEPRECATED_ATTRIBUTES];\n return replacement ?? null;\n}\n\nexport function autoRedactPII(\n attributes: Record<string, unknown>,\n policy: AttributePolicy = {},\n): Record<string, unknown> {\n const { guardrails = { pii: 'redact' } } = policy;\n\n const redacted: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(attributes)) {\n redacted[key] = validateAttribute(key, value, { guardrails });\n }\n return redacted;\n}\n\nexport function defaultGuardrails(): AttributeGuardrails {\n return {\n pii: 'redact',\n maxLength: 255,\n validateEnum: true,\n warnDeprecated: true,\n };\n}\n","/**\n * Attribute utility functions\n */\n\nimport type { AttributeValue } from '../trace-context';\nimport {\n validateAttribute,\n autoRedactPII,\n defaultGuardrails,\n checkDeprecatedAttribute,\n type AttributePolicy,\n} from './validators';\n\n// Type for objects that have setAttributes method (spans or contexts)\n// Using a generic parameter to accommodate different AttributeValue types\ntype AttributeSetter = {\n setAttributes: (attrs: Record<string, AttributeValue>) => void;\n};\n\nexport function mergeAttrs(\n ...attrSets: Array<Record<string, unknown> | undefined>\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n for (const attrSet of attrSets) {\n if (attrSet) {\n Object.assign(result, attrSet);\n }\n }\n return result;\n}\n\nexport function safeSetAttributes(\n span: AttributeSetter,\n attrs: Record<string, unknown>,\n policy?: AttributePolicy,\n): void {\n // Merge user-supplied guardrails with defaults so callers can tweak\n // a single option without opting out of the rest\n const mergedGuardrails = {\n ...defaultGuardrails(),\n ...policy?.guardrails,\n };\n const effectivePolicy: AttributePolicy = {\n ...policy,\n guardrails: mergedGuardrails,\n };\n\n const validated = autoRedactPII(attrs, effectivePolicy);\n\n const sanitizedAttrs: Record<string, AttributeValue> = {};\n for (const [key, value] of Object.entries(validated)) {\n if (value !== undefined) {\n // Check for deprecated attributes and log warnings\n checkDeprecatedAttribute(key, effectivePolicy);\n const validatedValue = validateAttribute(key, value, effectivePolicy);\n if (validatedValue !== undefined) {\n // Cast to AttributeValue since validateAttribute ensures valid types\n sanitizedAttrs[key] = validatedValue as AttributeValue;\n }\n }\n }\n\n span.setAttributes(sanitizedAttrs);\n}\n","/**\n * Signal attachment helpers\n * These functions know WHERE to attach attributes automatically\n * They handle span, resource, and log signals correctly\n */\n\nimport type { Span, Attributes } from '@opentelemetry/api';\nimport {\n resourceFromAttributes,\n type Resource,\n} from '@opentelemetry/resources';\nimport type { TraceContext } from '../trace-context';\nimport { attrs } from './builders';\nimport { safeSetAttributes } from './utils';\n\nexport function setUser(\n spanOrContext: Span | TraceContext,\n data: import('./types').UserAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.user.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function setSession(\n spanOrContext: Span | TraceContext,\n data: import('./types').SessionAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.session.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function setDevice(\n spanOrContext: Span | TraceContext,\n data: import('./types').DeviceAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.device.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function httpServer(\n spanOrContext: Span | TraceContext,\n data: import('./types').HTTPServerAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.http.server(data);\n\n if ('updateName' in spanOrContext && data.method && data.route) {\n const span = spanOrContext as Span;\n span.updateName(`HTTP ${data.method} ${data.route}`);\n }\n\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function httpClient(\n spanOrContext: Span | TraceContext,\n data: import('./types').HTTPClientAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.http.client(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function dbClient(\n spanOrContext: Span | TraceContext,\n data: import('./types').DBAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.db.client.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\n/**\n * Merge service attributes into a Resource and return a new Resource.\n *\n * Resource.attributes is readonly, so this function returns a new merged\n * Resource rather than mutating the input.\n *\n * @param resource - The existing resource to merge with\n * @param data - Service attributes to add\n * @returns A new Resource with the merged attributes\n *\n * @example\n * ```typescript\n * const baseResource = Resource.default();\n * const enrichedResource = mergeServiceResource(baseResource, {\n * name: 'my-service',\n * version: '1.0.0',\n * });\n * ```\n */\nexport function mergeServiceResource(\n resource: Resource,\n data: import('./types').ServiceAttrs,\n): Resource {\n const attributes = attrs.service.data(data);\n return resource.merge(resourceFromAttributes(attributes as Attributes));\n}\n\nexport function identify(\n spanOrContext: Span | TraceContext,\n data: {\n user?: import('./types').UserAttrs;\n session?: import('./types').SessionAttrs;\n device?: import('./types').DeviceAttrs;\n },\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const allAttrs = [];\n\n if (data.user) {\n allAttrs.push(attrs.user.data(data.user));\n }\n if (data.session) {\n allAttrs.push(attrs.session.data(data.session));\n }\n if (data.device) {\n allAttrs.push(attrs.device.data(data.device));\n }\n\n const merged: Record<string, unknown> = {};\n for (const attrSet of allAttrs) {\n Object.assign(merged, attrSet);\n }\n\n safeSetAttributes(spanOrContext, merged, guardrails);\n}\n\nexport function request(\n spanOrContext: Span | TraceContext,\n data: import('./types').HTTPServerAttrs & {\n clientIp?: string;\n },\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const httpAttrs = attrs.http.server(data);\n const networkAttrs = attrs.network.peerAddress(data.clientIp || '');\n const merged = { ...httpAttrs, ...networkAttrs };\n safeSetAttributes(spanOrContext, merged, guardrails);\n}\n\nexport function setError(\n spanOrContext: Span | TraceContext,\n data: import('./types').ErrorAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.error.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n\nexport function setException(\n spanOrContext: Span | TraceContext,\n data: import('./types').ExceptionAttrs,\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const attributes = attrs.exception.data(data);\n safeSetAttributes(spanOrContext, attributes, guardrails);\n}\n","/**\n * Domain helpers for common attribute patterns\n * These bundle multiple attribute groups into semantic helpers\n */\n\nimport { attrs } from './builders';\nimport { safeSetAttributes } from './utils';\n\nexport function transaction(\n spanOrContext: import('../trace-context').TraceContext,\n config: {\n user?: import('./types').UserAttrs;\n session?: import('./types').SessionAttrs;\n method?: string;\n route?: string;\n statusCode?: number;\n clientIp?: string;\n },\n guardrails?: import('./validators').AttributePolicy,\n): void {\n const userAttrs = attrs.user.data(config.user || {});\n const sessionAttrs = attrs.session.data(config.session || {});\n const httpAttrs = attrs.http.server({\n method: config.method,\n route: config.route,\n statusCode: config.statusCode,\n });\n const networkAttrs = attrs.network.peerAddress(config.clientIp || '');\n\n const merged = {\n ...userAttrs,\n ...sessionAttrs,\n ...httpAttrs,\n ...networkAttrs,\n };\n\n if (config.method && config.route && 'updateName' in spanOrContext) {\n spanOrContext.updateName(`HTTP ${config.method} ${config.route}`);\n }\n\n safeSetAttributes(spanOrContext, merged, guardrails);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAa,QAAQ;CACnB,MAAM;EACJ,KAAK,WAAmB,GAAG,eAAe,KAAK,MAAM;EACrD,QAAQ,WAAmB,GAAG,eAAe,QAAQ,MAAM;EAC3D,OAAO,WAAmB,GAAG,eAAe,OAAO,MAAM;EACzD,WAAW,WAAmB,GAAG,eAAe,WAAW,MAAM;EACjE,OAAO,WAAmB,GAAG,eAAe,OAAO,MAAM;EACzD,QAAQ,WAAqB,GAAG,eAAe,QAAQ,MAAM;EAE7D,OAAO,SAAoB;GACzB,MAAM,SAAkC,CAAC;GACzC,IAAI,KAAK,OAAO,QAAW,OAAO,eAAe,MAAM,KAAK;GAC5D,IAAI,KAAK,UAAU,QAAW,OAAO,eAAe,SAAS,KAAK;GAClE,IAAI,KAAK,SAAS,QAAW,OAAO,eAAe,QAAQ,KAAK;GACh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ACxJA,SAAgB,YACd,eACA,QAQA,YACM;CACN,MAAM,YAAY,MAAM,KAAK,KAAK,OAAO,QAAQ,CAAC,CAAC;CACnD,MAAM,eAAe,MAAM,QAAQ,KAAK,OAAO,WAAW,CAAC,CAAC;CAC5D,MAAM,YAAY,MAAM,KAAK,OAAO;EAClC,QAAQ,OAAO;EACf,OAAO,OAAO;EACd,YAAY,OAAO;CACrB,CAAC;CACD,MAAM,eAAe,MAAM,QAAQ,YAAY,OAAO,YAAY,EAAE;CAEpE,MAAM,SAAS;EACb,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;CACL;CAEA,IAAI,OAAO,UAAU,OAAO,SAAS,gBAAgB,eACnD,cAAc,WAAW,QAAQ,OAAO,OAAO,GAAG,OAAO,OAAO;CAGlE,kBAAkB,eAAe,QAAQ,UAAU;AACrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CX0aG1Uh.d.ts","names":[],"sources":["../src/attributes/types.ts","../src/attributes/builders.ts","../src/attributes/validators.ts","../src/attributes/attachers.ts","../src/attributes/domains.ts","../src/attributes/utils.ts"],"mappings":";;;;;UAOiB,SAAA;EACf,EAAA;EACA,KAAA;EACA,IAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;AAAA;AAAA,UAGe,YAAA;EACf,EAAA;EACA,UAAU;AAAA;AAAA,UAGK,WAAA;EACf,EAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;AAAA;AAAA,UAGe,eAAA;EACf,MAAA;EACA,KAAA;EACA,UAAA;EACA,QAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;AAAA;AAAA,UAGe,eAAA;EACf,MAAA;EACA,GAAA;EACA,UAAA;AAAA;AAAA,UAGe,OAAA;EACf,MAAA;EAbA;EAeA,IAAA;EAbA;EAeA,SAAA;EACA,SAAA;EACA,cAAA;EACA,SAAA;EACA,YAAA;EACA,SAAA;EACA,cAAA;EACA,YAAA;AAAA;AAAA,UAGe,YAAA;EACf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+B,eAAA;;;AHvD1B;AAGP;;;;AAEY;AAGZ;;;;;;;;;AAIW;AAGX;iBGkEgB,oBAAA,CACd,QAAA,EAAU,QAAA,EACV,IAAA,EADkB,YAAA,GAEjB,QAAA;AAAA,iBAKa,QAAA,CACd,aAAA,EAAe,IAAA,GAAO,YAAA,EACtB,IAAA;EACE,IAAA,GAFgC,SAAA;EAGhC,OAAA,GADkC,YAAA;EAElC,MAAA,GADwC,WAAA;AAAA,GAG1C,UAAA,GAFwC,eAAA;AAAA,iBAwB1B,OAAA,CACd,aAAA,EAAe,IAAA,GAAO,YAAA,EACtB,IAAA,EADkC,eAAA;EAEhC,QAAA;AAAA,GAEF,UAAA,GAHuC,eAAA;AAAA,iBAWzB,QAAA,CACd,aAAA,EAAe,IAAA,GAAO,YAAA,EACtB,IAAA,EADkC,UAAA,EAElC,UAAA,GADkC,eAAA;AAAA,iBAOpB,YAAA,CACd,aAAA,EAAe,IAAA,GAAO,YAAA,EACtB,IAAA,EADkC,cAAA,EAElC,UAAA,GADsC,eAAA;;;;;;;iBCnJxB,WAAA,CACd,aAAA,EADyB,YAAA,EAEzB,MAAA;EACE,IAAA,GAFoD,SAAA;EAGpD,OAAA,GADkC,YAAA;EAElC,MAAA;EACA,KAAA;EACA,UAAA;EACA,QAAA;AAAA,GAEF,UAAA,GAN0C,eAAA;;;KCGvC,eAAA;EACH,aAAA,GAAgB,KAAA,EAAO,MAAM,SAAS,gBAAA;AAAA;AAAA,iBAGxB,UAAA,IACX,QAAA,EAAU,KAAA,CAAM,MAAA,iCAClB,MAAA;AAAA,iBAUa,iBAAA,CACd,IAAA,EAAM,eAAA,EACN,KAAA,EAAO,MAAA,mBACP,MAAA,GAAS,eAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DIWZFKUS.d.cts","names":[],"sources":["../src/attributes/types.ts","../src/attributes/builders.ts","../src/attributes/validators.ts","../src/attributes/attachers.ts","../src/attributes/domains.ts","../src/attributes/utils.ts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B,MAAA;EACE,IAAA,GAFoD,SAAA;EAGpD,OAAA,GADkC,YAAA;EAElC,MAAA;EACA,KAAA;EACA,UAAA;EACA,QAAA;AAAA,GAEF,UAAA,GAN0C,eAAA;;;KCGvC,eAAA;EACH,aAAA,GAAgB,KAAA,EAAO,MAAM,SAAS,gBAAA;AAAA;AAAA,iBAGxB,UAAA,IACX,QAAA,EAAU,KAAA,CAAM,MAAA,iCAClB,MAAA;AAAA,iBAUa,iBAAA,CACd,IAAA,EAAM,eAAA,EACN,KAAA,EAAO,MAAA,mBACP,MAAA,GAAS,eAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-DfXA3R1L.js","names":[],"sources":["../src/attributes/registry.ts"],"sourcesContent":["/**\n * OpenTelemetry attribute registry\n * Central source of truth for attribute keys, types, and metadata\n */\n\nexport const UserAttributes = {\n id: 'user.id' as const,\n email: 'user.email' as const,\n name: 'user.name' as const,\n fullName: 'user.full_name' as const,\n hash: 'user.hash' as const,\n roles: 'user.roles' as const,\n} as const;\n\nexport const SessionAttributes = {\n id: 'session.id' as const,\n previousId: 'session.previous_id' as const,\n} as const;\n\nexport const DeviceAttributes = {\n id: 'device.id' as const,\n manufacturer: 'device.manufacturer' as const,\n modelIdentifier: 'device.model.identifier' as const,\n modelName: 'device.model.name' as const,\n} as const;\n\nexport const HTTPAttributes = {\n connectionState: 'http.connection.state' as const,\n requestMethod: 'http.request.method' as const,\n requestMethodOriginal: 'http.request.method_original' as const,\n requestResendCount: 'http.request.resend_count' as const,\n requestSize: 'http.request.size' as const,\n requestBodySize: 'http.request.body.size' as const,\n responseSize: 'http.response.size' as const,\n responseBodySize: 'http.response.body.size' as const,\n responseStatusCode: 'http.response.status_code' as const,\n route: 'http.route' as const,\n} as const;\n\nexport const DBAttributes = {\n clientConnectionPoolName: 'db.client.connection.pool.name' as const,\n clientConnectionState: 'db.client.connection.state' as const,\n collectionName: 'db.collection.name' as const,\n namespace: 'db.namespace' as const,\n operationBatchSize: 'db.operation.batch.size' as const,\n operationName: 'db.operation.name' as const,\n querySummary: 'db.query.summary' as const,\n queryText: 'db.query.text' as const,\n responseReturnedRows: 'db.response.returned_rows' as const,\n responseStatusCode: 'db.response.status_code' as const,\n systemName: 'db.system.name' as const,\n statement: 'db.statement' as const,\n} as const;\n\nexport const ServiceAttributes = {\n name: 'service.name' as const,\n instance: 'service.instance.id' as const,\n version: 'service.version' as const,\n} as const;\n\nexport const NetworkAttributes = {\n peerAddress: 'network.peer.address' as const,\n peerPort: 'network.peer.port' as const,\n transport: 'network.transport' as const,\n type: 'network.type' as const,\n protocolName: 'network.protocol.name' as const,\n protocolVersion: 'network.protocol.version' as const,\n} as const;\n\nexport const ServerAddressAttributes = {\n address: 'server.address' as const,\n port: 'server.port' as const,\n socketAddress: 'server.socket.address' as const,\n} as const;\n\nexport const URLAttributes = {\n scheme: 'url.scheme' as const,\n full: 'url.full' as const,\n path: 'url.path' as const,\n query: 'url.query' as const,\n fragment: 'url.fragment' as const,\n} as const;\n\nexport const ErrorAttributes = {\n type: 'error.type' as const,\n message: 'error.message' as const,\n stackTrace: 'error.stack' as const,\n code: 'error.code' as const,\n} as const;\n\nexport const ExceptionAttributes = {\n escaped: 'exception.escaped' as const,\n message: 'exception.message' as const,\n stackTrace: 'exception.stacktrace' as const,\n type: 'exception.type' as const,\n moduleName: 'exception.module' as const,\n} as const;\n\nexport const ProcessAttributes = {\n pid: 'process.pid' as const,\n executablePath: 'process.executable.path' as const,\n command: 'process.command' as const,\n owner: 'process.owner' as const,\n commandArgs: 'process.command_args' as const,\n} as const;\n\nexport const ThreadAttributes = {\n id: 'thread.id' as const,\n name: 'thread.name' as const,\n} as const;\n\nexport const ContainerAttributes = {\n id: 'container.id' as const,\n name: 'container.name' as const,\n image: 'container.image.name' as const,\n tag: 'container.image.tag' as const,\n} as const;\n\nexport const K8sAttributes = {\n podName: 'k8s.pod.name' as const,\n namespaceName: 'k8s.namespace.name' as const,\n deploymentName: 'k8s.deployment.name' as const,\n state: 'k8s.state.name' as const,\n} as const;\n\nexport const CloudAttributes = {\n provider: 'cloud.provider' as const,\n accountId: 'cloud.account.id' as const,\n region: 'cloud.region' as const,\n availabilityZone: 'cloud.availability_zone' as const,\n platform: 'cloud.platform' as const,\n} as const;\n\nexport const FaaSAttributes = {\n name: 'faas.name' as const,\n version: 'faas.version' as const,\n instance: 'faas.instance' as const,\n execution: 'faas.execution' as const,\n coldstart: 'faas.coldstart' as const,\n} as const;\n\nexport const FeatureFlagAttributes = {\n key: 'feature.flag.key' as const,\n provider: 'feature.flag.provider_name' as const,\n variant: 'feature.flag.variant.name' as const,\n} as const;\n\nexport const MessagingAttributes = {\n system: 'messaging.system' as const,\n destination: 'messaging.destination.name' as const,\n operation: 'messaging.operation' as const,\n messageId: 'messaging.message.id' as const,\n conversationId: 'messaging.conversation_id' as const,\n batchMessageCount: 'messaging.batch.message_count' as const,\n consumerGroup: 'messaging.consumer.group' as const,\n} as const;\n\nexport const GenAIAttributes = {\n system: 'gen.ai.system' as const,\n requestModel: 'gen.ai.request.model' as const,\n responseModel: 'gen.ai.response.model' as const,\n operationName: 'gen.ai.operation.name' as const,\n usagePromptTokens: 'gen.ai.usage.prompt_tokens' as const,\n usageCompletionTokens: 'gen.ai.usage.completion_tokens' as const,\n provider: 'gen.ai.provider' as const,\n} as const;\n\nexport const RPCAttributes = {\n system: 'rpc.system' as const,\n service: 'rpc.service' as const,\n method: 'rpc.method' as const,\n grpcStatusCode: 'rpc.grpc.status_code' as const,\n} as const;\n\nexport const GraphQLAttributes = {\n document: 'graphql.document' as const,\n operationName: 'graphql.operation.name' as const,\n operationType: 'graphql.operation.type' as const,\n} as const;\n\nexport const PeerAttributes = {\n service: 'peer.service' as const,\n} as const;\n\nexport const ClientAttributes = {\n address: 'client.address' as const,\n port: 'client.port' as const,\n socketAddress: 'client.socket.address' as const,\n} as const;\n\nexport const DeploymentAttributes = {\n environment: 'deployment.environment' as const,\n id: 'deployment.environment.id' as const,\n} as const;\n\nexport const OTelAttributes = {\n libraryName: 'otel.library.name' as const,\n libraryVersion: 'otel.library.version' as const,\n statusCode: 'otel.status_code' as const,\n} as const;\n\nexport const CodeAttributes = {\n namespace: 'code.namespace' as const,\n filepath: 'code.filepath' as const,\n function: 'code.function' as const,\n class: 'code.class' as const,\n method: 'code.method' as const,\n column: 'code.column' as const,\n lineNumber: 'code.lineno' as const,\n repository: 'code.repository' as const,\n revision: 'code.revision' as const,\n} as const;\n\nexport const TLSAttributes = {\n protocolVersion: 'tls.protocol.version' as const,\n cipher: 'tls.cipher' as const,\n curveName: 'tls.curve.name' as const,\n resumed: 'tls.resumed' as const,\n} as const;\n\nexport const BrowserAttributes = {\n platform: 'browser.platform' as const,\n language: 'browser.language' as const,\n brand: 'browser.brand' as const,\n mobile: 'browser.mobile' as const,\n} as const;\n\nexport const AndroidAttributes = {\n appVersion: 'android.app.version' as const,\n package: 'android.package' as const,\n activityName: 'android.activity.name' as const,\n} as const;\n\nexport const IOSAttributes = {\n deviceModel: 'ios.device.model' as const,\n version: 'ios.version' as const,\n} as const;\n\nexport const GeoAttributes = {\n cityName: 'geo.city.name' as const,\n countryCode: 'geo.country.name' as const,\n continentCode: 'geo.continent.code' as const,\n} as const;\n\nexport const UserAgentAttributes = {\n original: 'user_agent.original' as const,\n} as const;\n\nexport const AWSAttributes = {\n ecsClusterArn: 'aws.ecs.cluster.arn' as const,\n ecsContainerArn: 'aws.ecs.container.arn' as const,\n logGroupName: 'aws.log.group.name' as const,\n requestId: 'aws.requestId' as const,\n} as const;\n\nexport const AzureAttributes = {\n subscriptionId: 'azure.subscription.id' as const,\n tenantId: 'azure.tenant.id' as const,\n} as const;\n\nexport const GCPAttributes = {\n project: 'gcp.project.id' as const,\n instanceName: 'gcp.instance.name' as const,\n zone: 'gcp.zone' as const,\n} as const;\n\nexport const CassandraAttributes = {\n consistencyLevel: 'cassandra.consistency.level' as const,\n coordinatorId: 'cassandra.coordinator.id' as const,\n dataCenter: 'cassandra.coordinator.dc' as const,\n pageSize: 'cassandra.page.size' as const,\n} as const;\n\nexport const ElasticsearchAttributes = {\n clusterName: 'elasticsearch.cluster.name' as const,\n nodeId: 'elasticsearch.node.name' as const,\n} as const;\n\nexport const MongoDBAttributes = {\n collectionName: 'mongodb.collection.name' as const,\n} as const;\n\nexport const RedisAttributes = {\n databaseIndex: 'redis.database.index' as const,\n} as const;\n\nexport const MSSQLAttributes = {\n instanceName: 'mssql.instance.name' as const,\n} as const;\n\nexport const PostgreSQLAttributes = {\n databaseName: 'postgresql.database.name' as const,\n} as const;\n\nexport const AWSLambdaAttributes = {\n requestId: 'aws.lambda.invoked_arn' as const,\n requestFunction: 'aws.lambda.invoked_function_arn' as const,\n} as const;\n\nexport const OpenAIAttributes = {\n requestId: 'openai.request.id' as const,\n responseModel: 'openai.response.model' as const,\n responseOrganization: 'openai.response.organization' as const,\n} as const;\n\nexport const AzureAIAAttributes = {\n resource: 'azure.ai.inference.resource' as const,\n deploymentId: 'azure.ai.inference.deployment.id' as const,\n} as const;\n\nexport const AWSBedrockAttributes = {\n requestId: 'aws.bedrock.requestId' as const,\n responseModel: 'aws.bedrock.responseModel' as const,\n} as const;\n\nexport const TestAttributes = {\n framework: 'test.framework' as const,\n name: 'test.name' as const,\n} as const;\n\nexport const ArtifactAttributes = {\n type: 'artifact.type' as const,\n id: 'artifact.id' as const,\n checksum: 'artifact.checksum' as const,\n} as const;\n\nexport const CICDAttributes = {\n pipelineName: 'ci.pipeline.name' as const,\n pipelineRunId: 'ci.pipeline.run.id' as const,\n} as const;\n"],"mappings":";;;;;AAKA,MAAa,iBAAiB;CAC5B,IAAI;CACJ,OAAO;CACP,MAAM;CACN,UAAU;CACV,MAAM;CACN,OAAO;AACT;AAEA,MAAa,oBAAoB;CAC/B,IAAI;CACJ,YAAY;AACd;AAEA,MAAa,mBAAmB;CAC9B,IAAI;CACJ,cAAc;CACd,iBAAiB;CACjB,WAAW;AACb;AAEA,MAAa,iBAAiB;CAC5B,iBAAiB;CAC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AAK;CACL,UAAU;CACV,SAAS;AACX;AAEA,MAAa,sBAAsB;CACjC,QAAQ;CACR,aAAa;CACb,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;AACjB;AAEA,MAAa,kBAAkB;CAC7B,QAAQ;CACR,cAAc;CACd,eAAe;CACf,eAAe;CACf,mBAAmB;CACnB,uBAAuB;CACvB,UAAU;AACZ;AAEA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,gBAAgB;AAClB;AAEA,MAAa,oBAAoB;CAC/B,UAAU;CACV,eAAe;CACf,eAAe;AACjB;AAiBA,MAAa,iBAAiB;CAC5B,aAAa;CACb,gBAAgB;CAChB,YAAY;AACd;AAEA,MAAa,iBAAiB;CAC5B,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,UAAU;AACZ;AAEA,MAAa,gBAAgB;CAC3B,iBAAiB;CACjB,QAAQ;CACR,WAAW;CACX,SAAS;AACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-JZg2J3RZ.cjs","names":[],"sources":["../src/attributes/registry.ts"],"sourcesContent":["/**\n * OpenTelemetry attribute registry\n * Central source of truth for attribute keys, types, and metadata\n */\n\nexport const UserAttributes = {\n id: 'user.id' as const,\n email: 'user.email' as const,\n name: 'user.name' as const,\n fullName: 'user.full_name' as const,\n hash: 'user.hash' as const,\n roles: 'user.roles' as const,\n} as const;\n\nexport const SessionAttributes = {\n id: 'session.id' as const,\n previousId: 'session.previous_id' as const,\n} as const;\n\nexport const DeviceAttributes = {\n id: 'device.id' as const,\n manufacturer: 'device.manufacturer' as const,\n modelIdentifier: 'device.model.identifier' as const,\n modelName: 'device.model.name' as const,\n} as const;\n\nexport const HTTPAttributes = {\n connectionState: 'http.connection.state' as const,\n requestMethod: 'http.request.method' as const,\n requestMethodOriginal: 'http.request.method_original' as const,\n requestResendCount: 'http.request.resend_count' as const,\n requestSize: 'http.request.size' as const,\n requestBodySize: 'http.request.body.size' as const,\n responseSize: 'http.response.size' as const,\n responseBodySize: 'http.response.body.size' as const,\n responseStatusCode: 'http.response.status_code' as const,\n route: 'http.route' as const,\n} as const;\n\nexport const DBAttributes = {\n clientConnectionPoolName: 'db.client.connection.pool.name' as const,\n clientConnectionState: 'db.client.connection.state' as const,\n collectionName: 'db.collection.name' as const,\n namespace: 'db.namespace' as const,\n operationBatchSize: 'db.operation.batch.size' as const,\n operationName: 'db.operation.name' as const,\n querySummary: 'db.query.summary' as const,\n queryText: 'db.query.text' as const,\n responseReturnedRows: 'db.response.returned_rows' as const,\n responseStatusCode: 'db.response.status_code' as const,\n systemName: 'db.system.name' as const,\n statement: 'db.statement' as const,\n} as const;\n\nexport const ServiceAttributes = {\n name: 'service.name' as const,\n instance: 'service.instance.id' as const,\n version: 'service.version' as const,\n} as const;\n\nexport const NetworkAttributes = {\n peerAddress: 'network.peer.address' as const,\n peerPort: 'network.peer.port' as const,\n transport: 'network.transport' as const,\n type: 'network.type' as const,\n protocolName: 'network.protocol.name' as const,\n protocolVersion: 'network.protocol.version' as const,\n} as const;\n\nexport const ServerAddressAttributes = {\n address: 'server.address' as const,\n port: 'server.port' as const,\n socketAddress: 'server.socket.address' as const,\n} as const;\n\nexport const URLAttributes = {\n scheme: 'url.scheme' as const,\n full: 'url.full' as const,\n path: 'url.path' as const,\n query: 'url.query' as const,\n fragment: 'url.fragment' as const,\n} as const;\n\nexport const ErrorAttributes = {\n type: 'error.type' as const,\n message: 'error.message' as const,\n stackTrace: 'error.stack' as const,\n code: 'error.code' as const,\n} as const;\n\nexport const ExceptionAttributes = {\n escaped: 'exception.escaped' as const,\n message: 'exception.message' as const,\n stackTrace: 'exception.stacktrace' as const,\n type: 'exception.type' as const,\n moduleName: 'exception.module' as const,\n} as const;\n\nexport const ProcessAttributes = {\n pid: 'process.pid' as const,\n executablePath: 'process.executable.path' as const,\n command: 'process.command' as const,\n owner: 'process.owner' as const,\n commandArgs: 'process.command_args' as const,\n} as const;\n\nexport const ThreadAttributes = {\n id: 'thread.id' as const,\n name: 'thread.name' as const,\n} as const;\n\nexport const ContainerAttributes = {\n id: 'container.id' as const,\n name: 'container.name' as const,\n image: 'container.image.name' as const,\n tag: 'container.image.tag' as const,\n} as const;\n\nexport const K8sAttributes = {\n podName: 'k8s.pod.name' as const,\n namespaceName: 'k8s.namespace.name' as const,\n deploymentName: 'k8s.deployment.name' as const,\n state: 'k8s.state.name' as const,\n} as const;\n\nexport const CloudAttributes = {\n provider: 'cloud.provider' as const,\n accountId: 'cloud.account.id' as const,\n region: 'cloud.region' as const,\n availabilityZone: 'cloud.availability_zone' as const,\n platform: 'cloud.platform' as const,\n} as const;\n\nexport const FaaSAttributes = {\n name: 'faas.name' as const,\n version: 'faas.version' as const,\n instance: 'faas.instance' as const,\n execution: 'faas.execution' as const,\n coldstart: 'faas.coldstart' as const,\n} as const;\n\nexport const FeatureFlagAttributes = {\n key: 'feature.flag.key' as const,\n provider: 'feature.flag.provider_name' as const,\n variant: 'feature.flag.variant.name' as const,\n} as const;\n\nexport const MessagingAttributes = {\n system: 'messaging.system' as const,\n destination: 'messaging.destination.name' as const,\n operation: 'messaging.operation' as const,\n messageId: 'messaging.message.id' as const,\n conversationId: 'messaging.conversation_id' as const,\n batchMessageCount: 'messaging.batch.message_count' as const,\n consumerGroup: 'messaging.consumer.group' as const,\n} as const;\n\nexport const GenAIAttributes = {\n system: 'gen.ai.system' as const,\n requestModel: 'gen.ai.request.model' as const,\n responseModel: 'gen.ai.response.model' as const,\n operationName: 'gen.ai.operation.name' as const,\n usagePromptTokens: 'gen.ai.usage.prompt_tokens' as const,\n usageCompletionTokens: 'gen.ai.usage.completion_tokens' as const,\n provider: 'gen.ai.provider' as const,\n} as const;\n\nexport const RPCAttributes = {\n system: 'rpc.system' as const,\n service: 'rpc.service' as const,\n method: 'rpc.method' as const,\n grpcStatusCode: 'rpc.grpc.status_code' as const,\n} as const;\n\nexport const GraphQLAttributes = {\n document: 'graphql.document' as const,\n operationName: 'graphql.operation.name' as const,\n operationType: 'graphql.operation.type' as const,\n} as const;\n\nexport const PeerAttributes = {\n service: 'peer.service' as const,\n} as const;\n\nexport const ClientAttributes = {\n address: 'client.address' as const,\n port: 'client.port' as const,\n socketAddress: 'client.socket.address' as const,\n} as const;\n\nexport const DeploymentAttributes = {\n environment: 'deployment.environment' as const,\n id: 'deployment.environment.id' as const,\n} as const;\n\nexport const OTelAttributes = {\n libraryName: 'otel.library.name' as const,\n libraryVersion: 'otel.library.version' as const,\n statusCode: 'otel.status_code' as const,\n} as const;\n\nexport const CodeAttributes = {\n namespace: 'code.namespace' as const,\n filepath: 'code.filepath' as const,\n function: 'code.function' as const,\n class: 'code.class' as const,\n method: 'code.method' as const,\n column: 'code.column' as const,\n lineNumber: 'code.lineno' as const,\n repository: 'code.repository' as const,\n revision: 'code.revision' as const,\n} as const;\n\nexport const TLSAttributes = {\n protocolVersion: 'tls.protocol.version' as const,\n cipher: 'tls.cipher' as const,\n curveName: 'tls.curve.name' as const,\n resumed: 'tls.resumed' as const,\n} as const;\n\nexport const BrowserAttributes = {\n platform: 'browser.platform' as const,\n language: 'browser.language' as const,\n brand: 'browser.brand' as const,\n mobile: 'browser.mobile' as const,\n} as const;\n\nexport const AndroidAttributes = {\n appVersion: 'android.app.version' as const,\n package: 'android.package' as const,\n activityName: 'android.activity.name' as const,\n} as const;\n\nexport const IOSAttributes = {\n deviceModel: 'ios.device.model' as const,\n version: 'ios.version' as const,\n} as const;\n\nexport const GeoAttributes = {\n cityName: 'geo.city.name' as const,\n countryCode: 'geo.country.name' as const,\n continentCode: 'geo.continent.code' as const,\n} as const;\n\nexport const UserAgentAttributes = {\n original: 'user_agent.original' as const,\n} as const;\n\nexport const AWSAttributes = {\n ecsClusterArn: 'aws.ecs.cluster.arn' as const,\n ecsContainerArn: 'aws.ecs.container.arn' as const,\n logGroupName: 'aws.log.group.name' as const,\n requestId: 'aws.requestId' as const,\n} as const;\n\nexport const AzureAttributes = {\n subscriptionId: 'azure.subscription.id' as const,\n tenantId: 'azure.tenant.id' as const,\n} as const;\n\nexport const GCPAttributes = {\n project: 'gcp.project.id' as const,\n instanceName: 'gcp.instance.name' as const,\n zone: 'gcp.zone' as const,\n} as const;\n\nexport const CassandraAttributes = {\n consistencyLevel: 'cassandra.consistency.level' as const,\n coordinatorId: 'cassandra.coordinator.id' as const,\n dataCenter: 'cassandra.coordinator.dc' as const,\n pageSize: 'cassandra.page.size' as const,\n} as const;\n\nexport const ElasticsearchAttributes = {\n clusterName: 'elasticsearch.cluster.name' as const,\n nodeId: 'elasticsearch.node.name' as const,\n} as const;\n\nexport const MongoDBAttributes = {\n collectionName: 'mongodb.collection.name' as const,\n} as const;\n\nexport const RedisAttributes = {\n databaseIndex: 'redis.database.index' as const,\n} as const;\n\nexport const MSSQLAttributes = {\n instanceName: 'mssql.instance.name' as const,\n} as const;\n\nexport const PostgreSQLAttributes = {\n databaseName: 'postgresql.database.name' as const,\n} as const;\n\nexport const AWSLambdaAttributes = {\n requestId: 'aws.lambda.invoked_arn' as const,\n requestFunction: 'aws.lambda.invoked_function_arn' as const,\n} as const;\n\nexport const OpenAIAttributes = {\n requestId: 'openai.request.id' as const,\n responseModel: 'openai.response.model' as const,\n responseOrganization: 'openai.response.organization' as const,\n} as const;\n\nexport const AzureAIAAttributes = {\n resource: 'azure.ai.inference.resource' as const,\n deploymentId: 'azure.ai.inference.deployment.id' as const,\n} as const;\n\nexport const AWSBedrockAttributes = {\n requestId: 'aws.bedrock.requestId' as const,\n responseModel: 'aws.bedrock.responseModel' as const,\n} as const;\n\nexport const TestAttributes = {\n framework: 'test.framework' as const,\n name: 'test.name' as const,\n} as const;\n\nexport const ArtifactAttributes = {\n type: 'artifact.type' as const,\n id: 'artifact.id' as const,\n checksum: 'artifact.checksum' as const,\n} as const;\n\nexport const CICDAttributes = {\n pipelineName: 'ci.pipeline.name' as const,\n pipelineR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J,MAAM;CACN,OAAO;CACP,KAAK;AACP;AAEA,MAAa,gBAAgB;CAC3B,SAAS;CACT,eAAe;CACf,gBAAgB;CAChB,OAAO;AACT;AAEA,MAAa,kBAAkB;CAC7B,UAAU;CACV,WAAW;CACX,QAAQ;CACR,kBAAkB;CAClB,UAAU;AACZ;AAEA,MAAa,iBAAiB;CAC5B,MAAM;CACN,SAAS;CACT,UAAU;CACV,WAAW;CACX,WAAW;AACb;AAEA,MAAa,wBAAwB;CACnC,KAAK;CACL,UAAU;CACV,SAAS;AACX;AAEA,MAAa,sBAAsB;CACjC,QAAQ;CACR,aAAa;CACb,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;AACjB;AAEA,MAAa,kBAAkB;CAC7B,QAAQ;CACR,cAAc;CACd,eAAe;CACf,eAAe;CACf,mBAAmB;CACnB,uBAAuB;CACvB,UAAU;AACZ;AAEA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,gBAAgB;AAClB;AAEA,MAAa,oBAAoB;CAC/B,UAAU;CACV,eAAe;CACf,eAAe;AACjB;AAiBA,MAAa,iBAAiB;CAC5B,aAAa;CACb,gBAAgB;CAChB,YAAY;AACd;AAEA,MAAa,iBAAiB;CAC5B,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,UAAU;AACZ;AAEA,MAAa,gBAAgB;CAC3B,iBAAiB;CACjB,QAAQ;CACR,WAAW;CACX,SAAS;AACX"}
|
package/src/gen-ai-cost.test.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
-
import {
|
|
3
|
-
estimateLLMCost,
|
|
4
|
-
recordLLMCost,
|
|
5
|
-
GEN_AI_COST_ATTRIBUTE,
|
|
6
|
-
} from './gen-ai-cost';
|
|
7
|
-
|
|
8
|
-
describe('estimateLLMCost', () => {
|
|
9
|
-
it('estimates cost from input and output tokens', () => {
|
|
10
|
-
// claude-sonnet-4: $3 / 1M in, $15 / 1M out
|
|
11
|
-
const cost = estimateLLMCost('claude-sonnet-4', {
|
|
12
|
-
inputTokens: 1_000_000,
|
|
13
|
-
outputTokens: 1_000_000,
|
|
14
|
-
});
|
|
15
|
-
expect(cost).toBe(18);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('matches versioned model ids by longest prefix', () => {
|
|
19
|
-
const cost = estimateLLMCost('claude-sonnet-4-6-20251101', {
|
|
20
|
-
inputTokens: 1_000_000,
|
|
21
|
-
outputTokens: 0,
|
|
22
|
-
});
|
|
23
|
-
expect(cost).toBe(3);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('returns undefined for an unknown model', () => {
|
|
27
|
-
expect(
|
|
28
|
-
estimateLLMCost('totally-made-up', { inputTokens: 1000 }),
|
|
29
|
-
).toBeUndefined();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('bills cached input tokens at the cached rate', () => {
|
|
33
|
-
const pricing = {
|
|
34
|
-
custom: { inputPer1M: 10, outputPer1M: 30, cachedInputPer1M: 1 },
|
|
35
|
-
};
|
|
36
|
-
// 1M input, of which 800k cached: 200k @ $10/M + 800k @ $1/M = 2 + 0.8
|
|
37
|
-
const cost = estimateLLMCost(
|
|
38
|
-
'custom',
|
|
39
|
-
{ inputTokens: 1_000_000, cachedInputTokens: 800_000 },
|
|
40
|
-
{ pricing },
|
|
41
|
-
);
|
|
42
|
-
expect(cost).toBeCloseTo(2.8, 6);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('accepts a pricing override and extends the table', () => {
|
|
46
|
-
const cost = estimateLLMCost(
|
|
47
|
-
'my-model',
|
|
48
|
-
{ inputTokens: 500_000, outputTokens: 500_000 },
|
|
49
|
-
{ pricing: { 'my-model': { inputPer1M: 4, outputPer1M: 8 } } },
|
|
50
|
-
);
|
|
51
|
-
expect(cost).toBe(6);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('handles partial usage without throwing', () => {
|
|
55
|
-
expect(estimateLLMCost('gpt-4o-mini', {})).toBe(0);
|
|
56
|
-
expect(estimateLLMCost('gpt-4o-mini', { outputTokens: 1_000_000 })).toBe(
|
|
57
|
-
0.6,
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
describe('recordLLMCost', () => {
|
|
63
|
-
it('sets the cost attribute on the context for a known model', () => {
|
|
64
|
-
const setAttribute = vi.fn();
|
|
65
|
-
const cost = recordLLMCost({ setAttribute }, 'gpt-4o', {
|
|
66
|
-
inputTokens: 1_000_000,
|
|
67
|
-
outputTokens: 0,
|
|
68
|
-
});
|
|
69
|
-
expect(cost).toBe(2.5);
|
|
70
|
-
expect(setAttribute).toHaveBeenCalledWith(GEN_AI_COST_ATTRIBUTE, 2.5);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('sets no attribute for an unknown model', () => {
|
|
74
|
-
const setAttribute = vi.fn();
|
|
75
|
-
const cost = recordLLMCost({ setAttribute }, 'unknown-model', {
|
|
76
|
-
inputTokens: 100,
|
|
77
|
-
});
|
|
78
|
-
expect(cost).toBeUndefined();
|
|
79
|
-
expect(setAttribute).not.toHaveBeenCalled();
|
|
80
|
-
});
|
|
81
|
-
});
|
package/src/gen-ai-cost.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-model LLM cost estimation.
|
|
3
|
-
*
|
|
4
|
-
* Estimate the USD cost of an LLM call from its token usage and record it as a
|
|
5
|
-
* span attribute (`gen_ai.usage.cost.usd`). Pair with the
|
|
6
|
-
* `gen_ai.client.cost.usd` metric bucket advice in `gen-ai-metrics`.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import { trace, recordLLMCost } from 'autotel';
|
|
11
|
-
*
|
|
12
|
-
* export const chat = trace((ctx) => async (prompt: string) => {
|
|
13
|
-
* const res = await client.messages.create({ model, ... });
|
|
14
|
-
* recordLLMCost(ctx, model, {
|
|
15
|
-
* inputTokens: res.usage.input_tokens,
|
|
16
|
-
* outputTokens: res.usage.output_tokens,
|
|
17
|
-
* });
|
|
18
|
-
* return res;
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import type { TraceContext } from './trace-context';
|
|
24
|
-
|
|
25
|
-
/** Span attribute key autotel sets for an estimated call cost. */
|
|
26
|
-
export const GEN_AI_COST_ATTRIBUTE = 'gen_ai.usage.cost.usd';
|
|
27
|
-
|
|
28
|
-
/** Pricing for a single model, in USD per 1,000,000 tokens. */
|
|
29
|
-
export interface ModelPricing {
|
|
30
|
-
/** USD per 1M input (prompt) tokens. */
|
|
31
|
-
inputPer1M: number;
|
|
32
|
-
/** USD per 1M output (completion) tokens. */
|
|
33
|
-
outputPer1M: number;
|
|
34
|
-
/** USD per 1M cached input tokens. Defaults to {@link ModelPricing.inputPer1M}. */
|
|
35
|
-
cachedInputPer1M?: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Token counts for a single LLM call. */
|
|
39
|
-
export interface TokenUsage {
|
|
40
|
-
inputTokens?: number;
|
|
41
|
-
outputTokens?: number;
|
|
42
|
-
/** Cached input tokens, billed at {@link ModelPricing.cachedInputPer1M}. */
|
|
43
|
-
cachedInputTokens?: number;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface EstimateCostOptions {
|
|
47
|
-
/** Override or extend {@link MODEL_PRICING}. Keys are matched first. */
|
|
48
|
-
pricing?: Record<string, ModelPricing>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Approximate public list prices (USD per 1M tokens) at the time of writing.
|
|
53
|
-
* Prices change; treat these as convenience defaults, not a billing source of
|
|
54
|
-
* truth. Override per call via `options.pricing` or mutate this table at init.
|
|
55
|
-
* Matching is exact first, then by longest key prefix, so versioned model ids
|
|
56
|
-
* (`claude-sonnet-4-6-20251101`) resolve to a base entry (`claude-sonnet-4-6`).
|
|
57
|
-
*/
|
|
58
|
-
export const MODEL_PRICING: Record<string, ModelPricing> = {
|
|
59
|
-
// OpenAI
|
|
60
|
-
'gpt-4o': { inputPer1M: 2.5, outputPer1M: 10 },
|
|
61
|
-
'gpt-4o-mini': { inputPer1M: 0.15, outputPer1M: 0.6 },
|
|
62
|
-
'gpt-4.1': { inputPer1M: 2, outputPer1M: 8 },
|
|
63
|
-
'gpt-4.1-mini': { inputPer1M: 0.4, outputPer1M: 1.6 },
|
|
64
|
-
'gpt-4.1-nano': { inputPer1M: 0.1, outputPer1M: 0.4 },
|
|
65
|
-
'o3-mini': { inputPer1M: 1.1, outputPer1M: 4.4 },
|
|
66
|
-
// Anthropic Claude
|
|
67
|
-
'claude-opus-4': { inputPer1M: 15, outputPer1M: 75 },
|
|
68
|
-
'claude-sonnet-4': { inputPer1M: 3, outputPer1M: 15 },
|
|
69
|
-
'claude-3-5-sonnet': { inputPer1M: 3, outputPer1M: 15 },
|
|
70
|
-
'claude-3-5-haiku': { inputPer1M: 0.8, outputPer1M: 4 },
|
|
71
|
-
'claude-3-opus': { inputPer1M: 15, outputPer1M: 75 },
|
|
72
|
-
'claude-3-haiku': { inputPer1M: 0.25, outputPer1M: 1.25 },
|
|
73
|
-
// Google Gemini
|
|
74
|
-
'gemini-1.5-pro': { inputPer1M: 1.25, outputPer1M: 5 },
|
|
75
|
-
'gemini-1.5-flash': { inputPer1M: 0.075, outputPer1M: 0.3 },
|
|
76
|
-
'gemini-2.0-flash': { inputPer1M: 0.1, outputPer1M: 0.4 },
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
function resolvePricing(
|
|
80
|
-
table: Record<string, ModelPricing>,
|
|
81
|
-
model: string,
|
|
82
|
-
): ModelPricing | undefined {
|
|
83
|
-
const exact = table[model];
|
|
84
|
-
if (exact) return exact;
|
|
85
|
-
|
|
86
|
-
let best: ModelPricing | undefined;
|
|
87
|
-
let bestLength = 0;
|
|
88
|
-
for (const key of Object.keys(table)) {
|
|
89
|
-
if (model.startsWith(key) && key.length > bestLength) {
|
|
90
|
-
best = table[key];
|
|
91
|
-
bestLength = key.length;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return best;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function round(value: number): number {
|
|
98
|
-
return Math.round(value * 1e6) / 1e6;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Estimate the USD cost of an LLM call. Returns `undefined` when the model has
|
|
103
|
-
* no known pricing (supply one via `options.pricing`).
|
|
104
|
-
*/
|
|
105
|
-
export function estimateLLMCost(
|
|
106
|
-
model: string,
|
|
107
|
-
usage: TokenUsage,
|
|
108
|
-
options?: EstimateCostOptions,
|
|
109
|
-
): number | undefined {
|
|
110
|
-
const table = options?.pricing
|
|
111
|
-
? { ...MODEL_PRICING, ...options.pricing }
|
|
112
|
-
: MODEL_PRICING;
|
|
113
|
-
const price = resolvePricing(table, model);
|
|
114
|
-
if (!price) return undefined;
|
|
115
|
-
|
|
116
|
-
const cachedInput = usage.cachedInputTokens ?? 0;
|
|
117
|
-
const billedInput = Math.max(0, (usage.inputTokens ?? 0) - cachedInput);
|
|
118
|
-
const output = usage.outputTokens ?? 0;
|
|
119
|
-
const cachedRate = price.cachedInputPer1M ?? price.inputPer1M;
|
|
120
|
-
|
|
121
|
-
const cost =
|
|
122
|
-
(billedInput / 1_000_000) * price.inputPer1M +
|
|
123
|
-
(cachedInput / 1_000_000) * cachedRate +
|
|
124
|
-
(output / 1_000_000) * price.outputPer1M;
|
|
125
|
-
|
|
126
|
-
return round(cost);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Estimate cost and record it on `ctx` as the `gen_ai.usage.cost.usd` span
|
|
131
|
-
* attribute. Returns the estimated cost, or `undefined` when the model is
|
|
132
|
-
* unknown (in which case no attribute is set).
|
|
133
|
-
*/
|
|
134
|
-
export function recordLLMCost(
|
|
135
|
-
ctx: Pick<TraceContext, 'setAttribute'>,
|
|
136
|
-
model: string,
|
|
137
|
-
usage: TokenUsage,
|
|
138
|
-
options?: EstimateCostOptions,
|
|
139
|
-
): number | undefined {
|
|
140
|
-
const cost = estimateLLMCost(model, usage, options);
|
|
141
|
-
if (cost !== undefined) {
|
|
142
|
-
ctx.setAttribute(GEN_AI_COST_ATTRIBUTE, cost);
|
|
143
|
-
}
|
|
144
|
-
return cost;
|
|
145
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import type { TraceContext } from './trace-context';
|
|
3
|
-
import {
|
|
4
|
-
recordPromptSent,
|
|
5
|
-
recordResponseReceived,
|
|
6
|
-
recordRetry,
|
|
7
|
-
recordStreamFirstToken,
|
|
8
|
-
recordToolCall,
|
|
9
|
-
} from './gen-ai-events';
|
|
10
|
-
|
|
11
|
-
type CapturedEvent = { name: string; attrs?: Record<string, unknown> };
|
|
12
|
-
|
|
13
|
-
function captureCtx(): {
|
|
14
|
-
ctx: TraceContext;
|
|
15
|
-
events: CapturedEvent[];
|
|
16
|
-
} {
|
|
17
|
-
const events: CapturedEvent[] = [];
|
|
18
|
-
const ctx = {
|
|
19
|
-
addEvent: (name: string, attrs?: Record<string, unknown>) => {
|
|
20
|
-
events.push({ name, attrs });
|
|
21
|
-
},
|
|
22
|
-
setAttribute: () => {},
|
|
23
|
-
setAttributes: () => {},
|
|
24
|
-
setStatus: () => {},
|
|
25
|
-
recordException: () => {},
|
|
26
|
-
addLink: () => {},
|
|
27
|
-
addLinks: () => {},
|
|
28
|
-
updateName: () => {},
|
|
29
|
-
isRecording: () => true,
|
|
30
|
-
end: () => {},
|
|
31
|
-
} as unknown as TraceContext;
|
|
32
|
-
return { ctx, events };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
describe('GenAI span event helpers', () => {
|
|
36
|
-
it('recordPromptSent emits gen_ai.prompt.sent with canonical attrs', () => {
|
|
37
|
-
const { ctx, events } = captureCtx();
|
|
38
|
-
recordPromptSent(ctx, {
|
|
39
|
-
model: 'gpt-4o',
|
|
40
|
-
promptTokens: 1200,
|
|
41
|
-
messageCount: 3,
|
|
42
|
-
operation: 'chat',
|
|
43
|
-
});
|
|
44
|
-
expect(events).toHaveLength(1);
|
|
45
|
-
expect(events[0]).toEqual({
|
|
46
|
-
name: 'gen_ai.prompt.sent',
|
|
47
|
-
attrs: {
|
|
48
|
-
'gen_ai.request.model': 'gpt-4o',
|
|
49
|
-
'gen_ai.usage.input_tokens': 1200,
|
|
50
|
-
'gen_ai.request.message_count': 3,
|
|
51
|
-
'gen_ai.operation.name': 'chat',
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('recordPromptSent omits unset fields rather than writing undefined', () => {
|
|
57
|
-
const { ctx, events } = captureCtx();
|
|
58
|
-
recordPromptSent(ctx);
|
|
59
|
-
expect(events[0]?.attrs).toEqual({});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('recordResponseReceived joins finish reasons into a CSV for attribute compat', () => {
|
|
63
|
-
const { ctx, events } = captureCtx();
|
|
64
|
-
recordResponseReceived(ctx, {
|
|
65
|
-
model: 'gpt-4o-2024-11-20',
|
|
66
|
-
promptTokens: 1200,
|
|
67
|
-
completionTokens: 400,
|
|
68
|
-
totalTokens: 1600,
|
|
69
|
-
finishReasons: ['stop', 'tool_calls'],
|
|
70
|
-
});
|
|
71
|
-
expect(events[0]).toEqual({
|
|
72
|
-
name: 'gen_ai.response.received',
|
|
73
|
-
attrs: {
|
|
74
|
-
'gen_ai.response.model': 'gpt-4o-2024-11-20',
|
|
75
|
-
'gen_ai.usage.input_tokens': 1200,
|
|
76
|
-
'gen_ai.usage.output_tokens': 400,
|
|
77
|
-
'gen_ai.usage.total_tokens': 1600,
|
|
78
|
-
'gen_ai.response.finish_reasons': 'stop,tool_calls',
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('recordResponseReceived omits finish_reasons when empty', () => {
|
|
84
|
-
const { ctx, events } = captureCtx();
|
|
85
|
-
recordResponseReceived(ctx, { model: 'claude-sonnet-4-6' });
|
|
86
|
-
expect(events[0]?.attrs).not.toHaveProperty(
|
|
87
|
-
'gen_ai.response.finish_reasons',
|
|
88
|
-
);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('recordRetry captures attempt, reason, delay, and status code', () => {
|
|
92
|
-
const { ctx, events } = captureCtx();
|
|
93
|
-
recordRetry(ctx, {
|
|
94
|
-
attempt: 2,
|
|
95
|
-
reason: 'rate_limit',
|
|
96
|
-
delayMs: 1000,
|
|
97
|
-
statusCode: 429,
|
|
98
|
-
});
|
|
99
|
-
expect(events[0]).toEqual({
|
|
100
|
-
name: 'gen_ai.retry',
|
|
101
|
-
attrs: {
|
|
102
|
-
'retry.attempt': 2,
|
|
103
|
-
'retry.reason': 'rate_limit',
|
|
104
|
-
'retry.delay_ms': 1000,
|
|
105
|
-
'http.response.status_code': 429,
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it('recordToolCall writes canonical gen_ai.tool.* keys', () => {
|
|
111
|
-
const { ctx, events } = captureCtx();
|
|
112
|
-
recordToolCall(ctx, {
|
|
113
|
-
toolName: 'search_traces',
|
|
114
|
-
toolCallId: 'call-123',
|
|
115
|
-
arguments: '{"serviceName":"api"}',
|
|
116
|
-
});
|
|
117
|
-
expect(events[0]).toEqual({
|
|
118
|
-
name: 'gen_ai.tool.call',
|
|
119
|
-
attrs: {
|
|
120
|
-
'gen_ai.tool.name': 'search_traces',
|
|
121
|
-
'gen_ai.tool.call.id': 'call-123',
|
|
122
|
-
'gen_ai.tool.arguments': '{"serviceName":"api"}',
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it('recordStreamFirstToken is the bare marker for TTFT', () => {
|
|
128
|
-
const { ctx, events } = captureCtx();
|
|
129
|
-
recordStreamFirstToken(ctx, { tokensSoFar: 1 });
|
|
130
|
-
expect(events[0]).toEqual({
|
|
131
|
-
name: 'gen_ai.stream.first_token',
|
|
132
|
-
attrs: { 'gen_ai.stream.tokens_so_far': 1 },
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
});
|