autotel 4.0.0 → 4.2.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/README.md +26 -1
- package/dist/auto.cjs +2 -2
- package/dist/auto.js +1 -1
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.js +1 -1
- package/dist/decorators.cjs +1 -1
- package/dist/decorators.js +1 -1
- package/dist/{event-Dlqr4ZNL.cjs → event-BhHREDJk.cjs} +3 -3
- package/dist/{event-Dlqr4ZNL.cjs.map → event-BhHREDJk.cjs.map} +1 -1
- package/dist/{event-_58ryBjh.js → event-ByBTV9M2.js} +3 -3
- package/dist/{event-_58ryBjh.js.map → event-ByBTV9M2.js.map} +1 -1
- package/dist/event.cjs +1 -1
- package/dist/event.js +1 -1
- package/dist/{functional-BGkT8J-h.js → functional-DtI0u4vx.js} +19 -19
- package/dist/functional-DtI0u4vx.js.map +1 -0
- package/dist/{functional-C4CzoVrX.cjs → functional-zpzNLhky.cjs} +4 -4
- package/dist/{functional-C4CzoVrX.cjs.map → functional-zpzNLhky.cjs.map} +1 -1
- package/dist/functional.cjs +1 -1
- package/dist/functional.js +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/{init-DJQOdVlN.d.ts → init-B7u-DjxM.d.ts} +57 -2
- package/dist/init-B7u-DjxM.d.ts.map +1 -0
- package/dist/{init-DvapOXCc.cjs → init-BX7AmFRl.cjs} +40 -21
- package/dist/init-BX7AmFRl.cjs.map +1 -0
- package/dist/{init-Ch6t7MNI.js → init-D-jnNMix.js} +39 -20
- package/dist/init-D-jnNMix.js.map +1 -0
- package/dist/{init-CNp-ee80.d.cts → init-DSrRmVnz.d.cts} +57 -2
- package/dist/init-DSrRmVnz.d.cts.map +1 -0
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.js +1 -1
- package/dist/logger-D3Ej3DII.js +446 -0
- package/dist/logger-D3Ej3DII.js.map +1 -0
- package/dist/logger-thMPLpOG.cjs +487 -0
- package/dist/logger-thMPLpOG.cjs.map +1 -0
- package/dist/logger.cjs +8 -236
- package/dist/logger.js +2 -204
- package/dist/messaging.cjs +1 -1
- package/dist/messaging.js +1 -1
- package/dist/semantic-helpers.cjs +1 -1
- package/dist/semantic-helpers.js +1 -1
- package/dist/{track-3HY4NGV-.cjs → track-D59FfpL0.cjs} +2 -2
- package/dist/{track-3HY4NGV-.cjs.map → track-D59FfpL0.cjs.map} +1 -1
- package/dist/{track-nsKVy-pj.js → track-wc0HafS_.js} +6 -6
- package/dist/track-wc0HafS_.js.map +1 -0
- package/dist/webhook.cjs +1 -1
- package/dist/webhook.js +1 -1
- package/dist/workflow-distributed.cjs +1 -1
- package/dist/workflow-distributed.js +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.js +1 -1
- package/dist/{yaml-config-B3dQ82GR.cjs → yaml-config-Ck2uB0Dp.cjs} +2 -1
- package/dist/yaml-config-Ck2uB0Dp.cjs.map +1 -0
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.d.cts +7 -1
- package/dist/yaml-config.d.cts.map +1 -1
- package/dist/yaml-config.d.ts +7 -1
- package/dist/yaml-config.d.ts.map +1 -1
- package/dist/yaml-config.js +1 -0
- package/dist/yaml-config.js.map +1 -1
- package/package.json +1 -2
- package/skills/autotel-core/SKILL.md +2 -0
- package/skills/autotel-instrumentation/SKILL.md +25 -0
- package/skills/debug-missing-spans/SKILL.md +3 -1
- package/skills/migrate-to-autotel/SKILL.md +24 -23
- package/skills/review-otel-patterns/SKILL.md +5 -4
- package/dist/functional-BGkT8J-h.js.map +0 -1
- package/dist/init-CNp-ee80.d.cts.map +0 -1
- package/dist/init-Ch6t7MNI.js.map +0 -1
- package/dist/init-DJQOdVlN.d.ts.map +0 -1
- package/dist/init-DvapOXCc.cjs.map +0 -1
- package/dist/logger.cjs.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/track-nsKVy-pj.js.map +0 -1
- package/dist/yaml-config-B3dQ82GR.cjs.map +0 -1
- package/src/attribute-redacting-processor.test.ts +0 -763
- package/src/attribute-redacting-processor.ts +0 -621
- package/src/attributes/attachers.ts +0 -161
- package/src/attributes/builders.ts +0 -529
- package/src/attributes/domains.ts +0 -42
- package/src/attributes/index.ts +0 -81
- package/src/attributes/registry.ts +0 -323
- package/src/attributes/types.ts +0 -211
- package/src/attributes/utils.ts +0 -64
- package/src/attributes/validators.ts +0 -266
- package/src/attributes.test.ts +0 -292
- package/src/auto.ts +0 -67
- package/src/autotel-logger.test.ts +0 -548
- package/src/autotel-logger.ts +0 -364
- package/src/baggage-span-processor.test.ts +0 -202
- package/src/baggage-span-processor.ts +0 -100
- package/src/business-baggage.test.ts +0 -500
- package/src/business-baggage.ts +0 -669
- package/src/circuit-breaker.test.ts +0 -341
- package/src/circuit-breaker.ts +0 -184
- package/src/config.test.ts +0 -94
- package/src/config.ts +0 -172
- package/src/correlated-events.test.ts +0 -151
- package/src/correlated-events.ts +0 -47
- package/src/correlation-id.test.ts +0 -163
- package/src/correlation-id.ts +0 -206
- package/src/db.test.ts +0 -252
- package/src/db.ts +0 -447
- package/src/decorators.test.ts +0 -153
- package/src/decorators.ts +0 -188
- package/src/define-event.test.ts +0 -41
- package/src/define-event.ts +0 -58
- package/src/devtools.ts +0 -60
- package/src/drain-pipeline.test.ts +0 -68
- package/src/drain-pipeline.ts +0 -199
- package/src/drain-toolkit.test.ts +0 -113
- package/src/drain-toolkit.ts +0 -129
- package/src/enricher-toolkit.test.ts +0 -67
- package/src/enricher-toolkit.ts +0 -79
- package/src/enrichers.test.ts +0 -150
- package/src/enrichers.ts +0 -145
- package/src/env-config.test.ts +0 -323
- package/src/env-config.ts +0 -309
- package/src/error-catalog.test.ts +0 -133
- package/src/error-catalog.ts +0 -262
- package/src/event-queue.test.ts +0 -864
- package/src/event-queue.ts +0 -699
- package/src/event-subscriber.ts +0 -262
- package/src/event-testing.ts +0 -197
- package/src/event.test.ts +0 -1104
- package/src/event.ts +0 -988
- package/src/events-config.ts +0 -235
- package/src/exporters.ts +0 -165
- package/src/filtering-span-processor.test.ts +0 -281
- package/src/filtering-span-processor.ts +0 -111
- package/src/flatten-attributes.test.ts +0 -76
- package/src/flatten-attributes.ts +0 -80
- package/src/functional.strict-types.typecheck.ts +0 -53
- package/src/functional.test.ts +0 -1464
- package/src/functional.ts +0 -2539
- package/src/functional.types.test.ts +0 -135
- package/src/hook.mjs +0 -15
- package/src/http.test.ts +0 -485
- package/src/http.ts +0 -424
- package/src/index.ts +0 -433
- package/src/init-auto-redactor.test.ts +0 -53
- package/src/init-redactor.test.ts +0 -8
- package/src/init.customization.test.ts +0 -594
- package/src/init.integrations.test.ts +0 -399
- package/src/init.openllmetry.test.ts +0 -194
- package/src/init.protocol.test.ts +0 -215
- package/src/init.ts +0 -2312
- package/src/instrumentation.test.ts +0 -108
- package/src/instrumentation.ts +0 -319
- package/src/logger.test.ts +0 -125
- package/src/logger.ts +0 -341
- package/src/messaging-adapters.test.ts +0 -595
- package/src/messaging-adapters.ts +0 -583
- package/src/messaging-testing.test.ts +0 -573
- package/src/messaging-testing.ts +0 -935
- package/src/messaging.test.ts +0 -1646
- package/src/messaging.ts +0 -2245
- package/src/metric-helpers.ts +0 -47
- package/src/metric-testing.ts +0 -197
- package/src/metric.ts +0 -446
- package/src/metrics.test.ts +0 -241
- package/src/node-require.ts +0 -123
- package/src/operation-context.ts +0 -93
- package/src/parse-error.test.ts +0 -73
- package/src/parse-error.ts +0 -112
- package/src/posthog-logs.test.ts +0 -115
- package/src/posthog-logs.ts +0 -77
- package/src/pretty-console-exporter.test.ts +0 -545
- package/src/pretty-console-exporter.ts +0 -413
- package/src/pretty-log-formatter.test.ts +0 -123
- package/src/pretty-log-formatter.ts +0 -210
- package/src/processors/canonical-log-line-processor.test.ts +0 -523
- package/src/processors/canonical-log-line-processor.ts +0 -396
- package/src/processors.ts +0 -152
- package/src/rate-limiter.test.ts +0 -199
- package/src/rate-limiter.ts +0 -98
- package/src/redact-values.test.ts +0 -90
- package/src/redact-values.ts +0 -34
- package/src/register.ts +0 -37
- package/src/request-logger.test.ts +0 -545
- package/src/request-logger.ts +0 -342
- package/src/sampling.test.ts +0 -1060
- package/src/sampling.ts +0 -737
- package/src/security-schema.test.ts +0 -45
- package/src/security-schema.ts +0 -107
- package/src/semantic-conventions.ts +0 -15
- package/src/semantic-helpers.test.ts +0 -226
- package/src/semantic-helpers.ts +0 -438
- package/src/shutdown.test.ts +0 -364
- package/src/shutdown.ts +0 -246
- package/src/span-name-normalizer.test.ts +0 -377
- package/src/span-name-normalizer.ts +0 -213
- package/src/stable-hash.ts +0 -27
- package/src/structured-error.test.ts +0 -191
- package/src/structured-error.ts +0 -157
- package/src/stub.integration.test.ts +0 -361
- package/src/tail-sampling-processor.test.ts +0 -230
- package/src/tail-sampling-processor.ts +0 -55
- package/src/test-span-collector.test.ts +0 -234
- package/src/test-span-collector.ts +0 -150
- package/src/testing.ts +0 -705
- package/src/trace-context.test.ts +0 -73
- package/src/trace-context.ts +0 -567
- package/src/trace-helpers.new.test.ts +0 -278
- package/src/trace-helpers.test.ts +0 -290
- package/src/trace-helpers.ts +0 -710
- package/src/trace-hybrid.test.ts +0 -42
- package/src/trace-hybrid.ts +0 -37
- package/src/tracer-provider.test.ts +0 -183
- package/src/tracer-provider.ts +0 -266
- package/src/track.test.ts +0 -154
- package/src/track.ts +0 -216
- package/src/validate.test.ts +0 -287
- package/src/validate.ts +0 -307
- package/src/validation-attributes.ts +0 -43
- package/src/validation.test.ts +0 -330
- package/src/validation.ts +0 -246
- package/src/variable-name-inference.test.ts +0 -178
- package/src/variable-name-inference.ts +0 -242
- package/src/webhook.test.ts +0 -649
- package/src/webhook.ts +0 -637
- package/src/workflow-distributed.test.ts +0 -786
- package/src/workflow-distributed.ts +0 -916
- package/src/workflow.async-safety.integration.test.ts +0 -345
- package/src/workflow.test.ts +0 -647
- package/src/workflow.ts +0 -810
- package/src/yaml-config.test.ts +0 -337
- package/src/yaml-config.ts +0 -342
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domain helpers for common attribute patterns
|
|
3
|
-
* These bundle multiple attribute groups into semantic helpers
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { attrs } from './builders';
|
|
7
|
-
import { safeSetAttributes } from './utils';
|
|
8
|
-
|
|
9
|
-
export function transaction(
|
|
10
|
-
spanOrContext: import('../trace-context').TraceContext,
|
|
11
|
-
config: {
|
|
12
|
-
user?: import('./types').UserAttrs;
|
|
13
|
-
session?: import('./types').SessionAttrs;
|
|
14
|
-
method?: string;
|
|
15
|
-
route?: string;
|
|
16
|
-
statusCode?: number;
|
|
17
|
-
clientIp?: string;
|
|
18
|
-
},
|
|
19
|
-
guardrails?: import('./validators').AttributePolicy,
|
|
20
|
-
): void {
|
|
21
|
-
const userAttrs = attrs.user.data(config.user || {});
|
|
22
|
-
const sessionAttrs = attrs.session.data(config.session || {});
|
|
23
|
-
const httpAttrs = attrs.http.server({
|
|
24
|
-
method: config.method,
|
|
25
|
-
route: config.route,
|
|
26
|
-
statusCode: config.statusCode,
|
|
27
|
-
});
|
|
28
|
-
const networkAttrs = attrs.network.peerAddress(config.clientIp || '');
|
|
29
|
-
|
|
30
|
-
const merged = {
|
|
31
|
-
...userAttrs,
|
|
32
|
-
...sessionAttrs,
|
|
33
|
-
...httpAttrs,
|
|
34
|
-
...networkAttrs,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
if (config.method && config.route && 'updateName' in spanOrContext) {
|
|
38
|
-
spanOrContext.updateName(`HTTP ${config.method} ${config.route}`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
safeSetAttributes(spanOrContext, merged, guardrails);
|
|
42
|
-
}
|
package/src/attributes/index.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type-safe OpenTelemetry attribute builders and utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides autocomplete-first attribute construction, automatic PII redaction,
|
|
5
|
-
* and deprecation warnings for semantic attributes.
|
|
6
|
-
*
|
|
7
|
-
* @example Pattern A: Object builders
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { attrs, setUser } from 'autotel/attributes'
|
|
10
|
-
*
|
|
11
|
-
* setUser(span, {
|
|
12
|
-
* user: { id: '123', email: 'user@example.com' },
|
|
13
|
-
* session: { id: 'sess-1' }
|
|
14
|
-
* })
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @example Pattern B: Key builders
|
|
18
|
-
* ```typescript
|
|
19
|
-
* import { attrs, setUser } from 'autotel/attributes'
|
|
20
|
-
*
|
|
21
|
-
* ctx.setAttributes(attrs.user.id('123'))
|
|
22
|
-
* ctx.setAttributes(attrs.session.id('sess-1'))
|
|
23
|
-
* ctx.setAttributes(attrs.http.request.method('GET'))
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
export { attrs } from './builders';
|
|
28
|
-
export {
|
|
29
|
-
setUser,
|
|
30
|
-
setSession,
|
|
31
|
-
setDevice,
|
|
32
|
-
httpServer,
|
|
33
|
-
httpClient,
|
|
34
|
-
dbClient,
|
|
35
|
-
mergeServiceResource,
|
|
36
|
-
identify,
|
|
37
|
-
request,
|
|
38
|
-
setError,
|
|
39
|
-
setException,
|
|
40
|
-
} from './attachers';
|
|
41
|
-
export { transaction } from './domains';
|
|
42
|
-
export { mergeAttrs, safeSetAttributes } from './utils';
|
|
43
|
-
export {
|
|
44
|
-
validateAttribute,
|
|
45
|
-
checkDeprecatedAttribute,
|
|
46
|
-
autoRedactPII,
|
|
47
|
-
defaultGuardrails,
|
|
48
|
-
type AttributeGuardrails,
|
|
49
|
-
type AttributePolicy,
|
|
50
|
-
} from './validators';
|
|
51
|
-
|
|
52
|
-
export type {
|
|
53
|
-
UserAttrs,
|
|
54
|
-
SessionAttrs,
|
|
55
|
-
DeviceAttrs,
|
|
56
|
-
HTTPServerAttrs,
|
|
57
|
-
HTTPClientAttrs,
|
|
58
|
-
DBAttrs,
|
|
59
|
-
ServiceAttrs,
|
|
60
|
-
NetworkAttrs,
|
|
61
|
-
ErrorAttrs,
|
|
62
|
-
FeatureFlagAttrs,
|
|
63
|
-
MessagingAttrs,
|
|
64
|
-
CloudAttrs,
|
|
65
|
-
ServerAddressAttrs,
|
|
66
|
-
URLAttrs,
|
|
67
|
-
PeerAttrs,
|
|
68
|
-
ProcessAttrs,
|
|
69
|
-
ContainerAttrs,
|
|
70
|
-
K8sAttrs,
|
|
71
|
-
FaaSAttrs,
|
|
72
|
-
ThreadAttrs,
|
|
73
|
-
RPCAttrs,
|
|
74
|
-
GraphQLAttrs,
|
|
75
|
-
ClientAttrs,
|
|
76
|
-
DeploymentAttrs,
|
|
77
|
-
OTelAttrs,
|
|
78
|
-
CodeAttrs,
|
|
79
|
-
ExceptionAttrs,
|
|
80
|
-
TLSAttrs,
|
|
81
|
-
} from './types';
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenTelemetry attribute registry
|
|
3
|
-
* Central source of truth for attribute keys, types, and metadata
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export const UserAttributes = {
|
|
7
|
-
id: 'user.id' as const,
|
|
8
|
-
email: 'user.email' as const,
|
|
9
|
-
name: 'user.name' as const,
|
|
10
|
-
fullName: 'user.full_name' as const,
|
|
11
|
-
hash: 'user.hash' as const,
|
|
12
|
-
roles: 'user.roles' as const,
|
|
13
|
-
} as const;
|
|
14
|
-
|
|
15
|
-
export const SessionAttributes = {
|
|
16
|
-
id: 'session.id' as const,
|
|
17
|
-
previousId: 'session.previous_id' as const,
|
|
18
|
-
} as const;
|
|
19
|
-
|
|
20
|
-
export const DeviceAttributes = {
|
|
21
|
-
id: 'device.id' as const,
|
|
22
|
-
manufacturer: 'device.manufacturer' as const,
|
|
23
|
-
modelIdentifier: 'device.model.identifier' as const,
|
|
24
|
-
modelName: 'device.model.name' as const,
|
|
25
|
-
} as const;
|
|
26
|
-
|
|
27
|
-
export const HTTPAttributes = {
|
|
28
|
-
connectionState: 'http.connection.state' as const,
|
|
29
|
-
requestMethod: 'http.request.method' as const,
|
|
30
|
-
requestMethodOriginal: 'http.request.method_original' as const,
|
|
31
|
-
requestResendCount: 'http.request.resend_count' as const,
|
|
32
|
-
requestSize: 'http.request.size' as const,
|
|
33
|
-
requestBodySize: 'http.request.body.size' as const,
|
|
34
|
-
responseSize: 'http.response.size' as const,
|
|
35
|
-
responseBodySize: 'http.response.body.size' as const,
|
|
36
|
-
responseStatusCode: 'http.response.status_code' as const,
|
|
37
|
-
route: 'http.route' as const,
|
|
38
|
-
} as const;
|
|
39
|
-
|
|
40
|
-
export const DBAttributes = {
|
|
41
|
-
clientConnectionPoolName: 'db.client.connection.pool.name' as const,
|
|
42
|
-
clientConnectionState: 'db.client.connection.state' as const,
|
|
43
|
-
collectionName: 'db.collection.name' as const,
|
|
44
|
-
namespace: 'db.namespace' as const,
|
|
45
|
-
operationBatchSize: 'db.operation.batch.size' as const,
|
|
46
|
-
operationName: 'db.operation.name' as const,
|
|
47
|
-
querySummary: 'db.query.summary' as const,
|
|
48
|
-
queryText: 'db.query.text' as const,
|
|
49
|
-
responseReturnedRows: 'db.response.returned_rows' as const,
|
|
50
|
-
responseStatusCode: 'db.response.status_code' as const,
|
|
51
|
-
systemName: 'db.system.name' as const,
|
|
52
|
-
statement: 'db.statement' as const,
|
|
53
|
-
} as const;
|
|
54
|
-
|
|
55
|
-
export const ServiceAttributes = {
|
|
56
|
-
name: 'service.name' as const,
|
|
57
|
-
instance: 'service.instance.id' as const,
|
|
58
|
-
version: 'service.version' as const,
|
|
59
|
-
} as const;
|
|
60
|
-
|
|
61
|
-
export const NetworkAttributes = {
|
|
62
|
-
peerAddress: 'network.peer.address' as const,
|
|
63
|
-
peerPort: 'network.peer.port' as const,
|
|
64
|
-
transport: 'network.transport' as const,
|
|
65
|
-
type: 'network.type' as const,
|
|
66
|
-
protocolName: 'network.protocol.name' as const,
|
|
67
|
-
protocolVersion: 'network.protocol.version' as const,
|
|
68
|
-
} as const;
|
|
69
|
-
|
|
70
|
-
export const ServerAddressAttributes = {
|
|
71
|
-
address: 'server.address' as const,
|
|
72
|
-
port: 'server.port' as const,
|
|
73
|
-
socketAddress: 'server.socket.address' as const,
|
|
74
|
-
} as const;
|
|
75
|
-
|
|
76
|
-
export const URLAttributes = {
|
|
77
|
-
scheme: 'url.scheme' as const,
|
|
78
|
-
full: 'url.full' as const,
|
|
79
|
-
path: 'url.path' as const,
|
|
80
|
-
query: 'url.query' as const,
|
|
81
|
-
fragment: 'url.fragment' as const,
|
|
82
|
-
} as const;
|
|
83
|
-
|
|
84
|
-
export const ErrorAttributes = {
|
|
85
|
-
type: 'error.type' as const,
|
|
86
|
-
message: 'error.message' as const,
|
|
87
|
-
stackTrace: 'error.stack' as const,
|
|
88
|
-
code: 'error.code' as const,
|
|
89
|
-
} as const;
|
|
90
|
-
|
|
91
|
-
export const ExceptionAttributes = {
|
|
92
|
-
escaped: 'exception.escaped' as const,
|
|
93
|
-
message: 'exception.message' as const,
|
|
94
|
-
stackTrace: 'exception.stacktrace' as const,
|
|
95
|
-
type: 'exception.type' as const,
|
|
96
|
-
moduleName: 'exception.module' as const,
|
|
97
|
-
} as const;
|
|
98
|
-
|
|
99
|
-
export const ProcessAttributes = {
|
|
100
|
-
pid: 'process.pid' as const,
|
|
101
|
-
executablePath: 'process.executable.path' as const,
|
|
102
|
-
command: 'process.command' as const,
|
|
103
|
-
owner: 'process.owner' as const,
|
|
104
|
-
commandArgs: 'process.command_args' as const,
|
|
105
|
-
} as const;
|
|
106
|
-
|
|
107
|
-
export const ThreadAttributes = {
|
|
108
|
-
id: 'thread.id' as const,
|
|
109
|
-
name: 'thread.name' as const,
|
|
110
|
-
} as const;
|
|
111
|
-
|
|
112
|
-
export const ContainerAttributes = {
|
|
113
|
-
id: 'container.id' as const,
|
|
114
|
-
name: 'container.name' as const,
|
|
115
|
-
image: 'container.image.name' as const,
|
|
116
|
-
tag: 'container.image.tag' as const,
|
|
117
|
-
} as const;
|
|
118
|
-
|
|
119
|
-
export const K8sAttributes = {
|
|
120
|
-
podName: 'k8s.pod.name' as const,
|
|
121
|
-
namespaceName: 'k8s.namespace.name' as const,
|
|
122
|
-
deploymentName: 'k8s.deployment.name' as const,
|
|
123
|
-
state: 'k8s.state.name' as const,
|
|
124
|
-
} as const;
|
|
125
|
-
|
|
126
|
-
export const CloudAttributes = {
|
|
127
|
-
provider: 'cloud.provider' as const,
|
|
128
|
-
accountId: 'cloud.account.id' as const,
|
|
129
|
-
region: 'cloud.region' as const,
|
|
130
|
-
availabilityZone: 'cloud.availability_zone' as const,
|
|
131
|
-
platform: 'cloud.platform' as const,
|
|
132
|
-
} as const;
|
|
133
|
-
|
|
134
|
-
export const FaaSAttributes = {
|
|
135
|
-
name: 'faas.name' as const,
|
|
136
|
-
version: 'faas.version' as const,
|
|
137
|
-
instance: 'faas.instance' as const,
|
|
138
|
-
execution: 'faas.execution' as const,
|
|
139
|
-
coldstart: 'faas.coldstart' as const,
|
|
140
|
-
} as const;
|
|
141
|
-
|
|
142
|
-
export const FeatureFlagAttributes = {
|
|
143
|
-
key: 'feature.flag.key' as const,
|
|
144
|
-
provider: 'feature.flag.provider_name' as const,
|
|
145
|
-
variant: 'feature.flag.variant.name' as const,
|
|
146
|
-
} as const;
|
|
147
|
-
|
|
148
|
-
export const MessagingAttributes = {
|
|
149
|
-
system: 'messaging.system' as const,
|
|
150
|
-
destination: 'messaging.destination.name' as const,
|
|
151
|
-
operation: 'messaging.operation' as const,
|
|
152
|
-
messageId: 'messaging.message.id' as const,
|
|
153
|
-
conversationId: 'messaging.conversation_id' as const,
|
|
154
|
-
batchMessageCount: 'messaging.batch.message_count' as const,
|
|
155
|
-
consumerGroup: 'messaging.consumer.group' as const,
|
|
156
|
-
} as const;
|
|
157
|
-
|
|
158
|
-
// GenAI attribute registry moved to the `autotel-genai` package, which uses the
|
|
159
|
-
// canonical `gen_ai.*` namespace (these legacy `gen.ai.*` keys were non-spec).
|
|
160
|
-
|
|
161
|
-
export const RPCAttributes = {
|
|
162
|
-
system: 'rpc.system' as const,
|
|
163
|
-
service: 'rpc.service' as const,
|
|
164
|
-
method: 'rpc.method' as const,
|
|
165
|
-
grpcStatusCode: 'rpc.grpc.status_code' as const,
|
|
166
|
-
} as const;
|
|
167
|
-
|
|
168
|
-
export const GraphQLAttributes = {
|
|
169
|
-
document: 'graphql.document' as const,
|
|
170
|
-
operationName: 'graphql.operation.name' as const,
|
|
171
|
-
operationType: 'graphql.operation.type' as const,
|
|
172
|
-
} as const;
|
|
173
|
-
|
|
174
|
-
export const PeerAttributes = {
|
|
175
|
-
service: 'peer.service' as const,
|
|
176
|
-
} as const;
|
|
177
|
-
|
|
178
|
-
export const ClientAttributes = {
|
|
179
|
-
address: 'client.address' as const,
|
|
180
|
-
port: 'client.port' as const,
|
|
181
|
-
socketAddress: 'client.socket.address' as const,
|
|
182
|
-
} as const;
|
|
183
|
-
|
|
184
|
-
export const DeploymentAttributes = {
|
|
185
|
-
environment: 'deployment.environment' as const,
|
|
186
|
-
id: 'deployment.environment.id' as const,
|
|
187
|
-
} as const;
|
|
188
|
-
|
|
189
|
-
export const OTelAttributes = {
|
|
190
|
-
libraryName: 'otel.library.name' as const,
|
|
191
|
-
libraryVersion: 'otel.library.version' as const,
|
|
192
|
-
statusCode: 'otel.status_code' as const,
|
|
193
|
-
} as const;
|
|
194
|
-
|
|
195
|
-
export const CodeAttributes = {
|
|
196
|
-
namespace: 'code.namespace' as const,
|
|
197
|
-
filepath: 'code.filepath' as const,
|
|
198
|
-
function: 'code.function' as const,
|
|
199
|
-
class: 'code.class' as const,
|
|
200
|
-
method: 'code.method' as const,
|
|
201
|
-
column: 'code.column' as const,
|
|
202
|
-
lineNumber: 'code.lineno' as const,
|
|
203
|
-
repository: 'code.repository' as const,
|
|
204
|
-
revision: 'code.revision' as const,
|
|
205
|
-
} as const;
|
|
206
|
-
|
|
207
|
-
export const TLSAttributes = {
|
|
208
|
-
protocolVersion: 'tls.protocol.version' as const,
|
|
209
|
-
cipher: 'tls.cipher' as const,
|
|
210
|
-
curveName: 'tls.curve.name' as const,
|
|
211
|
-
resumed: 'tls.resumed' as const,
|
|
212
|
-
} as const;
|
|
213
|
-
|
|
214
|
-
export const BrowserAttributes = {
|
|
215
|
-
platform: 'browser.platform' as const,
|
|
216
|
-
language: 'browser.language' as const,
|
|
217
|
-
brand: 'browser.brand' as const,
|
|
218
|
-
mobile: 'browser.mobile' as const,
|
|
219
|
-
} as const;
|
|
220
|
-
|
|
221
|
-
export const AndroidAttributes = {
|
|
222
|
-
appVersion: 'android.app.version' as const,
|
|
223
|
-
package: 'android.package' as const,
|
|
224
|
-
activityName: 'android.activity.name' as const,
|
|
225
|
-
} as const;
|
|
226
|
-
|
|
227
|
-
export const IOSAttributes = {
|
|
228
|
-
deviceModel: 'ios.device.model' as const,
|
|
229
|
-
version: 'ios.version' as const,
|
|
230
|
-
} as const;
|
|
231
|
-
|
|
232
|
-
export const GeoAttributes = {
|
|
233
|
-
cityName: 'geo.city.name' as const,
|
|
234
|
-
countryCode: 'geo.country.name' as const,
|
|
235
|
-
continentCode: 'geo.continent.code' as const,
|
|
236
|
-
} as const;
|
|
237
|
-
|
|
238
|
-
export const UserAgentAttributes = {
|
|
239
|
-
original: 'user_agent.original' as const,
|
|
240
|
-
} as const;
|
|
241
|
-
|
|
242
|
-
export const AWSAttributes = {
|
|
243
|
-
ecsClusterArn: 'aws.ecs.cluster.arn' as const,
|
|
244
|
-
ecsContainerArn: 'aws.ecs.container.arn' as const,
|
|
245
|
-
logGroupName: 'aws.log.group.name' as const,
|
|
246
|
-
requestId: 'aws.requestId' as const,
|
|
247
|
-
} as const;
|
|
248
|
-
|
|
249
|
-
export const AzureAttributes = {
|
|
250
|
-
subscriptionId: 'azure.subscription.id' as const,
|
|
251
|
-
tenantId: 'azure.tenant.id' as const,
|
|
252
|
-
} as const;
|
|
253
|
-
|
|
254
|
-
export const GCPAttributes = {
|
|
255
|
-
project: 'gcp.project.id' as const,
|
|
256
|
-
instanceName: 'gcp.instance.name' as const,
|
|
257
|
-
zone: 'gcp.zone' as const,
|
|
258
|
-
} as const;
|
|
259
|
-
|
|
260
|
-
export const CassandraAttributes = {
|
|
261
|
-
consistencyLevel: 'cassandra.consistency.level' as const,
|
|
262
|
-
coordinatorId: 'cassandra.coordinator.id' as const,
|
|
263
|
-
dataCenter: 'cassandra.coordinator.dc' as const,
|
|
264
|
-
pageSize: 'cassandra.page.size' as const,
|
|
265
|
-
} as const;
|
|
266
|
-
|
|
267
|
-
export const ElasticsearchAttributes = {
|
|
268
|
-
clusterName: 'elasticsearch.cluster.name' as const,
|
|
269
|
-
nodeId: 'elasticsearch.node.name' as const,
|
|
270
|
-
} as const;
|
|
271
|
-
|
|
272
|
-
export const MongoDBAttributes = {
|
|
273
|
-
collectionName: 'mongodb.collection.name' as const,
|
|
274
|
-
} as const;
|
|
275
|
-
|
|
276
|
-
export const RedisAttributes = {
|
|
277
|
-
databaseIndex: 'redis.database.index' as const,
|
|
278
|
-
} as const;
|
|
279
|
-
|
|
280
|
-
export const MSSQLAttributes = {
|
|
281
|
-
instanceName: 'mssql.instance.name' as const,
|
|
282
|
-
} as const;
|
|
283
|
-
|
|
284
|
-
export const PostgreSQLAttributes = {
|
|
285
|
-
databaseName: 'postgresql.database.name' as const,
|
|
286
|
-
} as const;
|
|
287
|
-
|
|
288
|
-
export const AWSLambdaAttributes = {
|
|
289
|
-
requestId: 'aws.lambda.invoked_arn' as const,
|
|
290
|
-
requestFunction: 'aws.lambda.invoked_function_arn' as const,
|
|
291
|
-
} as const;
|
|
292
|
-
|
|
293
|
-
export const OpenAIAttributes = {
|
|
294
|
-
requestId: 'openai.request.id' as const,
|
|
295
|
-
responseModel: 'openai.response.model' as const,
|
|
296
|
-
responseOrganization: 'openai.response.organization' as const,
|
|
297
|
-
} as const;
|
|
298
|
-
|
|
299
|
-
export const AzureAIAAttributes = {
|
|
300
|
-
resource: 'azure.ai.inference.resource' as const,
|
|
301
|
-
deploymentId: 'azure.ai.inference.deployment.id' as const,
|
|
302
|
-
} as const;
|
|
303
|
-
|
|
304
|
-
export const AWSBedrockAttributes = {
|
|
305
|
-
requestId: 'aws.bedrock.requestId' as const,
|
|
306
|
-
responseModel: 'aws.bedrock.responseModel' as const,
|
|
307
|
-
} as const;
|
|
308
|
-
|
|
309
|
-
export const TestAttributes = {
|
|
310
|
-
framework: 'test.framework' as const,
|
|
311
|
-
name: 'test.name' as const,
|
|
312
|
-
} as const;
|
|
313
|
-
|
|
314
|
-
export const ArtifactAttributes = {
|
|
315
|
-
type: 'artifact.type' as const,
|
|
316
|
-
id: 'artifact.id' as const,
|
|
317
|
-
checksum: 'artifact.checksum' as const,
|
|
318
|
-
} as const;
|
|
319
|
-
|
|
320
|
-
export const CICDAttributes = {
|
|
321
|
-
pipelineName: 'ci.pipeline.name' as const,
|
|
322
|
-
pipelineRunId: 'ci.pipeline.run.id' as const,
|
|
323
|
-
} as const;
|
package/src/attributes/types.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for attribute builders
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export type PrimitiveValue = string | number | boolean;
|
|
6
|
-
export type ArrayValue = string[] | number[] | boolean[];
|
|
7
|
-
|
|
8
|
-
export interface UserAttrs {
|
|
9
|
-
id?: string;
|
|
10
|
-
email?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
fullName?: string;
|
|
13
|
-
hash?: string;
|
|
14
|
-
roles?: string[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface SessionAttrs {
|
|
18
|
-
id?: string;
|
|
19
|
-
previousId?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface DeviceAttrs {
|
|
23
|
-
id?: string;
|
|
24
|
-
manufacturer?: string;
|
|
25
|
-
modelIdentifier?: string;
|
|
26
|
-
modelName?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface HTTPServerAttrs {
|
|
30
|
-
method?: string;
|
|
31
|
-
route?: string;
|
|
32
|
-
statusCode?: number;
|
|
33
|
-
bodySize?: number;
|
|
34
|
-
requestSize?: number;
|
|
35
|
-
responseSize?: number;
|
|
36
|
-
resendCount?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface HTTPClientAttrs {
|
|
40
|
-
method?: string;
|
|
41
|
-
url?: string;
|
|
42
|
-
statusCode?: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface DBAttrs {
|
|
46
|
-
system?: string;
|
|
47
|
-
/** Database name - maps to db.namespace (db.name is deprecated) */
|
|
48
|
-
name?: string;
|
|
49
|
-
/** Explicit namespace - takes precedence over name if both provided */
|
|
50
|
-
namespace?: string;
|
|
51
|
-
operation?: string;
|
|
52
|
-
collectionName?: string;
|
|
53
|
-
statement?: string;
|
|
54
|
-
querySummary?: string;
|
|
55
|
-
queryText?: string;
|
|
56
|
-
responseStatus?: string | number;
|
|
57
|
-
rowsReturned?: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface ServiceAttrs {
|
|
61
|
-
name?: string;
|
|
62
|
-
instance?: string;
|
|
63
|
-
version?: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface NetworkAttrs {
|
|
67
|
-
protocolName?: string;
|
|
68
|
-
protocolVersion?: string;
|
|
69
|
-
peerAddress?: string;
|
|
70
|
-
peerPort?: number;
|
|
71
|
-
transport?: string;
|
|
72
|
-
connectionId?: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface ErrorAttrs {
|
|
76
|
-
type?: string;
|
|
77
|
-
message?: string;
|
|
78
|
-
stackTrace?: string;
|
|
79
|
-
code?: string | number;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface FeatureFlagAttrs {
|
|
83
|
-
key?: string;
|
|
84
|
-
provider?: string;
|
|
85
|
-
variant?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface MessagingAttrs {
|
|
89
|
-
system?: string;
|
|
90
|
-
destination?: string;
|
|
91
|
-
operation?: 'publish' | 'receive' | 'process';
|
|
92
|
-
messageId?: string;
|
|
93
|
-
conversationId?: string;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface CloudAttrs {
|
|
97
|
-
provider?: string;
|
|
98
|
-
accountId?: string;
|
|
99
|
-
region?: string;
|
|
100
|
-
availabilityZone?: string;
|
|
101
|
-
platform?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface ServerAddressAttrs {
|
|
105
|
-
address?: string;
|
|
106
|
-
port?: number;
|
|
107
|
-
socketAddress?: string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface URLAttrs {
|
|
111
|
-
scheme?: string;
|
|
112
|
-
full?: string;
|
|
113
|
-
path?: string;
|
|
114
|
-
query?: string;
|
|
115
|
-
fragment?: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface PeerAttrs {
|
|
119
|
-
service?: string;
|
|
120
|
-
address?: string;
|
|
121
|
-
port?: number;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export interface ProcessAttrs {
|
|
125
|
-
pid?: number;
|
|
126
|
-
executablePath?: string;
|
|
127
|
-
command?: string;
|
|
128
|
-
owner?: string;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface ContainerAttrs {
|
|
132
|
-
id?: string;
|
|
133
|
-
name?: string;
|
|
134
|
-
image?: string;
|
|
135
|
-
tag?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface K8sAttrs {
|
|
139
|
-
podName?: string;
|
|
140
|
-
namespace?: string;
|
|
141
|
-
deploymentName?: string;
|
|
142
|
-
state?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface FaaSAttrs {
|
|
146
|
-
name?: string;
|
|
147
|
-
version?: string;
|
|
148
|
-
instance?: string;
|
|
149
|
-
execution?: string;
|
|
150
|
-
coldstart?: boolean;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface ThreadAttrs {
|
|
154
|
-
id?: number;
|
|
155
|
-
name?: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export interface RPCAttrs {
|
|
159
|
-
system?: string;
|
|
160
|
-
service?: string;
|
|
161
|
-
method?: string;
|
|
162
|
-
message?: string;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface GraphQLAttrs {
|
|
166
|
-
document?: string;
|
|
167
|
-
operationName?: string;
|
|
168
|
-
type?: 'query' | 'mutation' | 'subscription';
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface ClientAttrs {
|
|
172
|
-
address?: string;
|
|
173
|
-
port?: number;
|
|
174
|
-
socketAddress?: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface DeploymentAttrs {
|
|
178
|
-
environment?: string;
|
|
179
|
-
id?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export interface OTelAttrs {
|
|
183
|
-
libraryName?: string;
|
|
184
|
-
libraryVersion?: string;
|
|
185
|
-
schemaUrl?: string;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export interface CodeAttrs {
|
|
189
|
-
namespace?: string;
|
|
190
|
-
filepath?: string;
|
|
191
|
-
function?: string;
|
|
192
|
-
class?: string;
|
|
193
|
-
method?: string;
|
|
194
|
-
repository?: string;
|
|
195
|
-
revision?: string;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export interface ExceptionAttrs {
|
|
199
|
-
escaped?: boolean;
|
|
200
|
-
message?: string;
|
|
201
|
-
stackTrace?: string;
|
|
202
|
-
type?: string;
|
|
203
|
-
moduleName?: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface TLSAttrs {
|
|
207
|
-
protocolVersion?: string;
|
|
208
|
-
cipher?: string;
|
|
209
|
-
curveName?: string;
|
|
210
|
-
resumed?: boolean;
|
|
211
|
-
}
|