autotel-cloudflare 12.0.1 → 13.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/README.md +1 -1
- package/dist/actors.js +12 -12
- package/dist/{bindings-s6W9szMm.js → bindings-BzekkOXx.js} +31 -31
- package/dist/bindings.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ This is real output from [`apps/cloudflare-example`](../../apps/cloudflare-examp
|
|
|
49
49
|
• GET /orders
|
|
50
50
|
• order.price order.id=ORD-1 order.total=120
|
|
51
51
|
• order.subtotal order.subtotal=100
|
|
52
|
-
• KV MY_KV: get db.system=cloudflare-kv db.operation=get ← autotel-instrumented
|
|
52
|
+
• KV MY_KV: get db.system.name=cloudflare-kv db.operation.name=get ← autotel-instrumented
|
|
53
53
|
• order.total order.total=120
|
|
54
54
|
• user.create user.duplicate=true
|
|
55
55
|
• db.checkDuplicate
|
package/dist/actors.js
CHANGED
|
@@ -39,9 +39,9 @@ function instrumentActorStorage(storage, actorInstance, actorClass) {
|
|
|
39
39
|
attributes: {
|
|
40
40
|
"actor.name": actorName,
|
|
41
41
|
"actor.class": actorClassName,
|
|
42
|
-
"db.system": "sqlite",
|
|
43
|
-
"db.operation": "exec",
|
|
44
|
-
"db.
|
|
42
|
+
"db.system.name": "sqlite",
|
|
43
|
+
"db.operation.name": "exec",
|
|
44
|
+
"db.query.text": query,
|
|
45
45
|
"db.statement.params_count": params.length
|
|
46
46
|
}
|
|
47
47
|
}, (span) => {
|
|
@@ -69,9 +69,9 @@ function instrumentActorStorage(storage, actorInstance, actorClass) {
|
|
|
69
69
|
attributes: {
|
|
70
70
|
"actor.name": actorName,
|
|
71
71
|
"actor.class": actorClassName,
|
|
72
|
-
"db.system": "sqlite",
|
|
73
|
-
"db.operation": "query",
|
|
74
|
-
"db.
|
|
72
|
+
"db.system.name": "sqlite",
|
|
73
|
+
"db.operation.name": "query",
|
|
74
|
+
"db.query.text": query,
|
|
75
75
|
"db.statement.params_count": params.length
|
|
76
76
|
}
|
|
77
77
|
}, (span) => {
|
|
@@ -99,8 +99,8 @@ function instrumentActorStorage(storage, actorInstance, actorClass) {
|
|
|
99
99
|
attributes: {
|
|
100
100
|
"actor.name": actorName,
|
|
101
101
|
"actor.class": actorClassName,
|
|
102
|
-
"db.system": "durable_object_storage",
|
|
103
|
-
"db.operation": "get",
|
|
102
|
+
"db.system.name": "durable_object_storage",
|
|
103
|
+
"db.operation.name": "get",
|
|
104
104
|
"db.key": key
|
|
105
105
|
}
|
|
106
106
|
}, async (span) => {
|
|
@@ -129,8 +129,8 @@ function instrumentActorStorage(storage, actorInstance, actorClass) {
|
|
|
129
129
|
attributes: {
|
|
130
130
|
"actor.name": actorName,
|
|
131
131
|
"actor.class": actorClassName,
|
|
132
|
-
"db.system": "durable_object_storage",
|
|
133
|
-
"db.operation": "put",
|
|
132
|
+
"db.system.name": "durable_object_storage",
|
|
133
|
+
"db.operation.name": "put",
|
|
134
134
|
"db.key": key,
|
|
135
135
|
"db.value_type": typeof val
|
|
136
136
|
}
|
|
@@ -158,8 +158,8 @@ function instrumentActorStorage(storage, actorInstance, actorClass) {
|
|
|
158
158
|
attributes: {
|
|
159
159
|
"actor.name": actorName,
|
|
160
160
|
"actor.class": actorClassName,
|
|
161
|
-
"db.system": "durable_object_storage",
|
|
162
|
-
"db.operation": "delete",
|
|
161
|
+
"db.system.name": "durable_object_storage",
|
|
162
|
+
"db.operation.name": "delete",
|
|
163
163
|
"db.key": key
|
|
164
164
|
}
|
|
165
165
|
}, async (span) => {
|
|
@@ -75,8 +75,8 @@ function instrumentVectorize(vectorize, indexName) {
|
|
|
75
75
|
const operation = prop;
|
|
76
76
|
const tracer = workerTracer("autotel-edge");
|
|
77
77
|
const attributes = {
|
|
78
|
-
"db.system": "cloudflare-vectorize",
|
|
79
|
-
"db.operation": operation,
|
|
78
|
+
"db.system.name": "cloudflare-vectorize",
|
|
79
|
+
"db.operation.name": operation,
|
|
80
80
|
"db.collection.name": name
|
|
81
81
|
};
|
|
82
82
|
if (operation === "query") {
|
|
@@ -126,8 +126,8 @@ function instrumentHyperdrive(hyperdrive, bindingName) {
|
|
|
126
126
|
if (prop === "connect" && method) return new Proxy(method, { apply: (fnTarget, _thisArg, args) => {
|
|
127
127
|
const tracer = workerTracer("autotel-edge");
|
|
128
128
|
const attributes = {
|
|
129
|
-
"db.system": "cloudflare-hyperdrive",
|
|
130
|
-
"db.operation": "connect"
|
|
129
|
+
"db.system.name": "cloudflare-hyperdrive",
|
|
130
|
+
"db.operation.name": "connect"
|
|
131
131
|
};
|
|
132
132
|
try {
|
|
133
133
|
setAttr({ setAttribute: (k, v) => {
|
|
@@ -183,7 +183,7 @@ function instrumentQueueProducer(queue, queueName) {
|
|
|
183
183
|
attributes: {
|
|
184
184
|
"messaging.system": "cloudflare-queues",
|
|
185
185
|
"messaging.operation.type": "publish",
|
|
186
|
-
"messaging.operation": "send",
|
|
186
|
+
"messaging.operation.name": "send",
|
|
187
187
|
"messaging.destination.name": name
|
|
188
188
|
}
|
|
189
189
|
}, async (span) => {
|
|
@@ -211,7 +211,7 @@ function instrumentQueueProducer(queue, queueName) {
|
|
|
211
211
|
attributes: {
|
|
212
212
|
"messaging.system": "cloudflare-queues",
|
|
213
213
|
"messaging.operation.type": "publish",
|
|
214
|
-
"messaging.operation": "sendBatch",
|
|
214
|
+
"messaging.operation.name": "sendBatch",
|
|
215
215
|
"messaging.destination.name": name,
|
|
216
216
|
"messaging.batch.message_count": Array.isArray(messages) ? messages.length : 0
|
|
217
217
|
}
|
|
@@ -432,8 +432,8 @@ function instrumentKV(kv, namespaceName) {
|
|
|
432
432
|
return workerTracer("autotel-edge").startActiveSpan(`KV ${name}: get`, {
|
|
433
433
|
kind: SpanKind.CLIENT,
|
|
434
434
|
attributes: {
|
|
435
|
-
"db.system": "cloudflare-kv",
|
|
436
|
-
"db.operation": "get",
|
|
435
|
+
"db.system.name": "cloudflare-kv",
|
|
436
|
+
"db.operation.name": "get",
|
|
437
437
|
"db.namespace": name,
|
|
438
438
|
"db.key": key,
|
|
439
439
|
"db.cache_hit": options?.cacheTtl !== void 0
|
|
@@ -461,8 +461,8 @@ function instrumentKV(kv, namespaceName) {
|
|
|
461
461
|
return workerTracer("autotel-edge").startActiveSpan(`KV ${name}: put`, {
|
|
462
462
|
kind: SpanKind.CLIENT,
|
|
463
463
|
attributes: {
|
|
464
|
-
"db.system": "cloudflare-kv",
|
|
465
|
-
"db.operation": "put",
|
|
464
|
+
"db.system.name": "cloudflare-kv",
|
|
465
|
+
"db.operation.name": "put",
|
|
466
466
|
"db.namespace": name,
|
|
467
467
|
"db.key": key
|
|
468
468
|
}
|
|
@@ -488,8 +488,8 @@ function instrumentKV(kv, namespaceName) {
|
|
|
488
488
|
return workerTracer("autotel-edge").startActiveSpan(`KV ${name}: delete`, {
|
|
489
489
|
kind: SpanKind.CLIENT,
|
|
490
490
|
attributes: {
|
|
491
|
-
"db.system": "cloudflare-kv",
|
|
492
|
-
"db.operation": "delete",
|
|
491
|
+
"db.system.name": "cloudflare-kv",
|
|
492
|
+
"db.operation.name": "delete",
|
|
493
493
|
"db.namespace": name,
|
|
494
494
|
"db.key": key
|
|
495
495
|
}
|
|
@@ -515,8 +515,8 @@ function instrumentKV(kv, namespaceName) {
|
|
|
515
515
|
return workerTracer("autotel-edge").startActiveSpan(`KV ${name}: list`, {
|
|
516
516
|
kind: SpanKind.CLIENT,
|
|
517
517
|
attributes: {
|
|
518
|
-
"db.system": "cloudflare-kv",
|
|
519
|
-
"db.operation": "list",
|
|
518
|
+
"db.system.name": "cloudflare-kv",
|
|
519
|
+
"db.operation.name": "list",
|
|
520
520
|
"db.namespace": name,
|
|
521
521
|
"db.prefix": options?.prefix || void 0,
|
|
522
522
|
"db.limit": options?.limit || void 0
|
|
@@ -556,8 +556,8 @@ function instrumentR2(r2, bucketName) {
|
|
|
556
556
|
return workerTracer("autotel-edge").startActiveSpan(`R2 ${name}: get`, {
|
|
557
557
|
kind: SpanKind.CLIENT,
|
|
558
558
|
attributes: {
|
|
559
|
-
"db.system": "cloudflare-r2",
|
|
560
|
-
"db.operation": "get",
|
|
559
|
+
"db.system.name": "cloudflare-r2",
|
|
560
|
+
"db.operation.name": "get",
|
|
561
561
|
"db.bucket": name,
|
|
562
562
|
"db.key": key
|
|
563
563
|
}
|
|
@@ -589,8 +589,8 @@ function instrumentR2(r2, bucketName) {
|
|
|
589
589
|
return workerTracer("autotel-edge").startActiveSpan(`R2 ${name}: put`, {
|
|
590
590
|
kind: SpanKind.CLIENT,
|
|
591
591
|
attributes: {
|
|
592
|
-
"db.system": "cloudflare-r2",
|
|
593
|
-
"db.operation": "put",
|
|
592
|
+
"db.system.name": "cloudflare-r2",
|
|
593
|
+
"db.operation.name": "put",
|
|
594
594
|
"db.bucket": name,
|
|
595
595
|
"db.key": key
|
|
596
596
|
}
|
|
@@ -618,8 +618,8 @@ function instrumentR2(r2, bucketName) {
|
|
|
618
618
|
return workerTracer("autotel-edge").startActiveSpan(`R2 ${name}: delete`, {
|
|
619
619
|
kind: SpanKind.CLIENT,
|
|
620
620
|
attributes: {
|
|
621
|
-
"db.system": "cloudflare-r2",
|
|
622
|
-
"db.operation": "delete",
|
|
621
|
+
"db.system.name": "cloudflare-r2",
|
|
622
|
+
"db.operation.name": "delete",
|
|
623
623
|
"db.bucket": name,
|
|
624
624
|
"db.keys_count": keys.length
|
|
625
625
|
}
|
|
@@ -645,8 +645,8 @@ function instrumentR2(r2, bucketName) {
|
|
|
645
645
|
return workerTracer("autotel-edge").startActiveSpan(`R2 ${name}: list`, {
|
|
646
646
|
kind: SpanKind.CLIENT,
|
|
647
647
|
attributes: {
|
|
648
|
-
"db.system": "cloudflare-r2",
|
|
649
|
-
"db.operation": "list",
|
|
648
|
+
"db.system.name": "cloudflare-r2",
|
|
649
|
+
"db.operation.name": "list",
|
|
650
650
|
"db.bucket": name,
|
|
651
651
|
"db.prefix": options?.prefix || void 0,
|
|
652
652
|
"db.limit": options?.limit || void 0
|
|
@@ -692,11 +692,11 @@ function instrumentD1(d1, databaseName) {
|
|
|
692
692
|
const captureMode = getActiveConfig()?.dataSafety?.captureDbStatement ?? "full";
|
|
693
693
|
const statement = sanitizeStatement(query, captureMode);
|
|
694
694
|
const attributes = {
|
|
695
|
-
"db.system": "cloudflare-d1",
|
|
696
|
-
"db.operation": prop,
|
|
697
|
-
"db.
|
|
695
|
+
"db.system.name": "cloudflare-d1",
|
|
696
|
+
"db.operation.name": prop,
|
|
697
|
+
"db.namespace": name
|
|
698
698
|
};
|
|
699
|
-
if (statement !== void 0) attributes["db.
|
|
699
|
+
if (statement !== void 0) attributes["db.query.text"] = statement;
|
|
700
700
|
return tracer.startActiveSpan(`D1 ${name}: ${prop}`, {
|
|
701
701
|
kind: SpanKind.CLIENT,
|
|
702
702
|
attributes
|
|
@@ -727,11 +727,11 @@ function instrumentD1(d1, databaseName) {
|
|
|
727
727
|
const tracer = workerTracer("autotel-edge");
|
|
728
728
|
const statement = sanitizeStatement(query, getActiveConfig()?.dataSafety?.captureDbStatement ?? "full");
|
|
729
729
|
const attributes = {
|
|
730
|
-
"db.system": "cloudflare-d1",
|
|
731
|
-
"db.operation": "exec",
|
|
732
|
-
"db.
|
|
730
|
+
"db.system.name": "cloudflare-d1",
|
|
731
|
+
"db.operation.name": "exec",
|
|
732
|
+
"db.namespace": name
|
|
733
733
|
};
|
|
734
|
-
if (statement !== void 0) attributes["db.
|
|
734
|
+
if (statement !== void 0) attributes["db.query.text"] = statement;
|
|
735
735
|
return tracer.startActiveSpan(`D1 ${name}: exec`, {
|
|
736
736
|
kind: SpanKind.CLIENT,
|
|
737
737
|
attributes
|
|
@@ -776,7 +776,7 @@ function instrumentServiceBinding(fetcher, serviceName) {
|
|
|
776
776
|
return workerTracer("autotel-edge").startActiveSpan(`Service ${name}: ${request.method}`, {
|
|
777
777
|
kind: SpanKind.CLIENT,
|
|
778
778
|
attributes: {
|
|
779
|
-
"rpc.system": "cloudflare-service-binding",
|
|
779
|
+
"rpc.system.name": "cloudflare-service-binding",
|
|
780
780
|
"rpc.service": name,
|
|
781
781
|
"http.request.method": request.method,
|
|
782
782
|
"url.full": request.url
|
package/dist/bindings.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as instrumentKV, c as instrumentImages, d as instrumentHyperdrive, f as instrumentVectorize, i as instrumentD1, l as instrumentAnalyticsEngine, n as instrumentRateLimiter, o as instrumentR2, p as instrumentAI, r as instrumentBindings, s as instrumentServiceBinding, t as instrumentBrowserRendering, u as instrumentQueueProducer } from "./bindings-
|
|
1
|
+
import { a as instrumentKV, c as instrumentImages, d as instrumentHyperdrive, f as instrumentVectorize, i as instrumentD1, l as instrumentAnalyticsEngine, n as instrumentRateLimiter, o as instrumentR2, p as instrumentAI, r as instrumentBindings, s as instrumentServiceBinding, t as instrumentBrowserRendering, u as instrumentQueueProducer } from "./bindings-BzekkOXx.js";
|
|
2
2
|
|
|
3
3
|
export { instrumentAI, instrumentAnalyticsEngine, instrumentBindings, instrumentBrowserRendering, instrumentD1, instrumentHyperdrive, instrumentImages, instrumentKV, instrumentQueueProducer, instrumentR2, instrumentRateLimiter, instrumentServiceBinding, instrumentVectorize };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as getWorkflowLogger, i as getRequestLogger, n as getActorLogger, r a
|
|
|
3
3
|
import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-D0EyAtsF.js";
|
|
4
4
|
import { a as unwrap, o as wrap, r as proxyExecutionContext, t as toException } from "./exception-D3xOCdBW.js";
|
|
5
5
|
import { t as workerTracer } from "./tracer-z8zwRBVS.js";
|
|
6
|
-
import { a as instrumentKV, c as instrumentImages, d as instrumentHyperdrive, f as instrumentVectorize, i as instrumentD1, l as instrumentAnalyticsEngine, n as instrumentRateLimiter, o as instrumentR2, p as instrumentAI, r as instrumentBindings, s as instrumentServiceBinding, t as instrumentBrowserRendering, u as instrumentQueueProducer } from "./bindings-
|
|
6
|
+
import { a as instrumentKV, c as instrumentImages, d as instrumentHyperdrive, f as instrumentVectorize, i as instrumentD1, l as instrumentAnalyticsEngine, n as instrumentRateLimiter, o as instrumentR2, p as instrumentAI, r as instrumentBindings, s as instrumentServiceBinding, t as instrumentBrowserRendering, u as instrumentQueueProducer } from "./bindings-BzekkOXx.js";
|
|
7
7
|
import { n as instrumentDO, t as instrumentWorkflow } from "./handlers-avm65CVU.js";
|
|
8
8
|
import { WorkerTracer, WorkerTracerProvider, createInitialiser, ensureGlobalContextManager, getActiveConfig, getServiceForPath, setConfig, shouldInstrumentPath, withNativeTracer } from "autotel-edge";
|
|
9
9
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-cloudflare",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "The #1 OpenTelemetry package for Cloudflare Workers - complete bindings coverage, native CF OTel integration, advanced sampling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
"license": "Apache-2.0",
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@opentelemetry/api": "^1.9.1",
|
|
78
|
-
"@opentelemetry/resources": "^2.
|
|
78
|
+
"@opentelemetry/resources": "^2.11.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@cloudflare/workers-types": "^5.20260728.1",
|
|
82
|
-
"autotel-edge": "5.
|
|
83
|
-
"autotel-genai": "0.
|
|
82
|
+
"autotel-edge": "5.1.0",
|
|
83
|
+
"autotel-genai": "0.10.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependenciesMeta": {
|
|
86
86
|
"autotel-edge": {
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@cloudflare/workers-types": "^5.20260728.1",
|
|
95
|
-
"@opentelemetry/context-async-hooks": "^2.
|
|
95
|
+
"@opentelemetry/context-async-hooks": "^2.11.0",
|
|
96
96
|
"@types/node": "^26.1.2",
|
|
97
|
+
"autotel-edge": "5.1.0",
|
|
98
|
+
"autotel-genai": "0.10.0",
|
|
97
99
|
"rimraf": "^6.1.3",
|
|
98
100
|
"tsdown": "^0.22.14",
|
|
99
101
|
"typescript": "^6.0.3",
|
|
100
102
|
"vitest": "^4.1.10",
|
|
101
|
-
"vitest-mock-extended": "^5.1.0"
|
|
102
|
-
"autotel-edge": "5.0.0",
|
|
103
|
-
"autotel-genai": "0.9.1"
|
|
103
|
+
"vitest-mock-extended": "^5.1.0"
|
|
104
104
|
},
|
|
105
105
|
"repository": {
|
|
106
106
|
"type": "git",
|