@google-cloud/pubsub 4.5.0 → 4.7.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/CHANGELOG.md +20 -0
- package/README.md +3 -1
- package/build/protos/google/pubsub/v1/pubsub.proto +12 -0
- package/build/protos/protos.d.ts +14 -1
- package/build/protos/protos.js +69 -1
- package/build/protos/protos.json +19 -1
- package/build/src/ack-metadata.js +2 -3
- package/build/src/ack-metadata.js.map +1 -1
- package/build/src/iam.d.ts +11 -3
- package/build/src/iam.js +12 -2
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +5 -1
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +2 -3
- package/build/src/lease-manager.js +19 -3
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/message-queues.d.ts +8 -4
- package/build/src/message-queues.js +17 -8
- package/build/src/message-queues.js.map +1 -1
- package/build/src/message-stream.d.ts +0 -1
- package/build/src/publisher/flow-publisher.js +5 -0
- package/build/src/publisher/flow-publisher.js.map +1 -1
- package/build/src/publisher/index.d.ts +3 -3
- package/build/src/publisher/index.js +24 -46
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-batch.d.ts +13 -1
- package/build/src/publisher/message-batch.js +11 -1
- package/build/src/publisher/message-batch.js.map +1 -1
- package/build/src/publisher/message-queues.d.ts +0 -2
- package/build/src/publisher/message-queues.js +32 -6
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/publisher/pubsub-message.d.ts +43 -1
- package/build/src/publisher/pubsub-message.js +30 -2
- package/build/src/publisher/pubsub-message.js.map +1 -1
- package/build/src/pubsub.d.ts +5 -1
- package/build/src/pubsub.js +4 -14
- package/build/src/pubsub.js.map +1 -1
- package/build/src/subscriber.d.ts +72 -8
- package/build/src/subscriber.js +179 -51
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +3 -3
- package/build/src/subscription.js +7 -4
- package/build/src/subscription.js.map +1 -1
- package/build/src/telemetry-tracing.d.ts +257 -0
- package/build/src/telemetry-tracing.js +648 -0
- package/build/src/telemetry-tracing.js.map +1 -0
- package/build/src/topic.d.ts +2 -2
- package/build/src/topic.js +8 -4
- package/build/src/topic.js.map +1 -1
- package/build/src/util.js +4 -4
- package/build/src/util.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +0 -1
- package/build/src/v1/schema_service_client.d.ts +0 -1
- package/build/src/v1/subscriber_client.d.ts +0 -1
- package/package.json +5 -4
- package/build/src/opentelemetry-tracing.d.ts +0 -23
- package/build/src/opentelemetry-tracing.js +0 -42
- package/build/src/opentelemetry-tracing.js.map +0 -1
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright 2020-2024 Google LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.legacyExports = exports.PubsubEvents = exports.PubsubSpans = exports.legacyAttributeName = exports.modernAttributeName = exports.pubsubSetter = exports.pubsubGetter = exports.PubsubMessageSet = exports.PubsubMessageGet = exports.PubsubMessageGetSet = exports.OpenTelemetryLevel = void 0;
|
|
18
|
+
exports.setGloballyEnabled = setGloballyEnabled;
|
|
19
|
+
exports.isEnabled = isEnabled;
|
|
20
|
+
exports.spanContextToContext = spanContextToContext;
|
|
21
|
+
exports.getSubscriptionInfo = getSubscriptionInfo;
|
|
22
|
+
exports.getTopicInfo = getTopicInfo;
|
|
23
|
+
exports.injectSpan = injectSpan;
|
|
24
|
+
exports.containsSpanContext = containsSpanContext;
|
|
25
|
+
exports.extractSpan = extractSpan;
|
|
26
|
+
const api_1 = require("@opentelemetry/api");
|
|
27
|
+
// We need this to get the library version.
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
29
|
+
const packageJson = require('../../package.json');
|
|
30
|
+
/**
|
|
31
|
+
* Instantiates a Opentelemetry tracer for the library
|
|
32
|
+
*
|
|
33
|
+
* @private
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
let cachedTracer;
|
|
37
|
+
function getTracer() {
|
|
38
|
+
const tracer = cachedTracer !== null && cachedTracer !== void 0 ? cachedTracer : api_1.trace.getTracer('@google-cloud/pubsub', packageJson.version);
|
|
39
|
+
cachedTracer = tracer;
|
|
40
|
+
return cachedTracer;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Determination of the level of OTel support we're providing.
|
|
44
|
+
*
|
|
45
|
+
* @private
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
var OpenTelemetryLevel;
|
|
49
|
+
(function (OpenTelemetryLevel) {
|
|
50
|
+
/**
|
|
51
|
+
* None: OTel support is not enabled because we found no trace provider, or
|
|
52
|
+
* the user has not enabled it.
|
|
53
|
+
*/
|
|
54
|
+
OpenTelemetryLevel[OpenTelemetryLevel["None"] = 0] = "None";
|
|
55
|
+
/**
|
|
56
|
+
* Legacy: We found a trace provider, but the user also specified the old
|
|
57
|
+
* manual enable flag; this will trigger the legacy attribute being included.
|
|
58
|
+
* The modern propagation attribute will _also_ be included.
|
|
59
|
+
*/
|
|
60
|
+
OpenTelemetryLevel[OpenTelemetryLevel["Legacy"] = 1] = "Legacy";
|
|
61
|
+
/**
|
|
62
|
+
* Modern: We will only inject/extract the modern propagation attribute.
|
|
63
|
+
*/
|
|
64
|
+
OpenTelemetryLevel[OpenTelemetryLevel["Modern"] = 2] = "Modern";
|
|
65
|
+
})(OpenTelemetryLevel || (exports.OpenTelemetryLevel = OpenTelemetryLevel = {}));
|
|
66
|
+
// True if user code elsewhere wants to enable OpenTelemetry support.
|
|
67
|
+
let globallyEnabled = false;
|
|
68
|
+
/**
|
|
69
|
+
* Manually set the OpenTelemetry enabledness.
|
|
70
|
+
*
|
|
71
|
+
* @param enabled The enabled flag to use, to override any automated methods.
|
|
72
|
+
* @private
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
function setGloballyEnabled(enabled) {
|
|
76
|
+
globallyEnabled = enabled;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Tries to divine what sort of OpenTelemetry we're supporting. See the enum
|
|
80
|
+
* for the meaning of the values, and other notes.
|
|
81
|
+
*
|
|
82
|
+
* Legacy OTel is no longer officially supported, but we don't want to
|
|
83
|
+
* break anyone at a non-major.
|
|
84
|
+
*
|
|
85
|
+
* @private
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
function isEnabled(publishSettings) {
|
|
89
|
+
// If we're not enabled, skip everything.
|
|
90
|
+
if (!globallyEnabled) {
|
|
91
|
+
return OpenTelemetryLevel.None;
|
|
92
|
+
}
|
|
93
|
+
if (publishSettings === null || publishSettings === void 0 ? void 0 : publishSettings.enableOpenTelemetryTracing) {
|
|
94
|
+
return OpenTelemetryLevel.Legacy;
|
|
95
|
+
}
|
|
96
|
+
// Enable modern support.
|
|
97
|
+
return OpenTelemetryLevel.Modern;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Implements common members for the TextMap getter and setter interfaces for Pub/Sub messages.
|
|
101
|
+
*
|
|
102
|
+
* @private
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
class PubsubMessageGetSet {
|
|
106
|
+
keys(carrier) {
|
|
107
|
+
return Object.getOwnPropertyNames(carrier.attributes)
|
|
108
|
+
.filter(n => n.startsWith(PubsubMessageGetSet.keyPrefix))
|
|
109
|
+
.map(n => n.substring(PubsubMessageGetSet.keyPrefix.length));
|
|
110
|
+
}
|
|
111
|
+
attributeName(key) {
|
|
112
|
+
return `${PubsubMessageGetSet.keyPrefix}${key}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.PubsubMessageGetSet = PubsubMessageGetSet;
|
|
116
|
+
PubsubMessageGetSet.keyPrefix = 'googclient_';
|
|
117
|
+
/**
|
|
118
|
+
* Implements the TextMap getter interface for Pub/Sub messages.
|
|
119
|
+
*
|
|
120
|
+
* @private
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
class PubsubMessageGet extends PubsubMessageGetSet {
|
|
124
|
+
get(carrier, key) {
|
|
125
|
+
var _a;
|
|
126
|
+
return (_a = carrier === null || carrier === void 0 ? void 0 : carrier.attributes) === null || _a === void 0 ? void 0 : _a[this.attributeName(key)];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.PubsubMessageGet = PubsubMessageGet;
|
|
130
|
+
/**
|
|
131
|
+
* Implements the TextMap setter interface for Pub/Sub messages.
|
|
132
|
+
*
|
|
133
|
+
* @private
|
|
134
|
+
* @internal
|
|
135
|
+
*/
|
|
136
|
+
class PubsubMessageSet extends PubsubMessageGetSet {
|
|
137
|
+
set(carrier, key, value) {
|
|
138
|
+
if (!carrier.attributes) {
|
|
139
|
+
carrier.attributes = {};
|
|
140
|
+
}
|
|
141
|
+
carrier.attributes[this.attributeName(key)] = value;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.PubsubMessageSet = PubsubMessageSet;
|
|
145
|
+
/**
|
|
146
|
+
* The getter to use when calling extract() on a Pub/Sub message.
|
|
147
|
+
*
|
|
148
|
+
* @private
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
exports.pubsubGetter = new PubsubMessageGet();
|
|
152
|
+
/**
|
|
153
|
+
* The setter to use when calling inject() on a Pub/Sub message.
|
|
154
|
+
*
|
|
155
|
+
* @private
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
exports.pubsubSetter = new PubsubMessageSet();
|
|
159
|
+
/**
|
|
160
|
+
* Converts a SpanContext to a full Context, as needed.
|
|
161
|
+
*
|
|
162
|
+
* @private
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
function spanContextToContext(parent) {
|
|
166
|
+
return parent ? api_1.trace.setSpanContext(api_1.context.active(), parent) : undefined;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The modern propagation attribute name.
|
|
170
|
+
*
|
|
171
|
+
* Technically this is determined by the OpenTelemetry library, but
|
|
172
|
+
* in practice, it follows the W3C spec, so this should be the right
|
|
173
|
+
* one. The only thing we're using it for, anyway, is emptying user
|
|
174
|
+
* supplied attributes.
|
|
175
|
+
*
|
|
176
|
+
* @private
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
exports.modernAttributeName = 'googclient_traceparent';
|
|
180
|
+
/**
|
|
181
|
+
* The old legacy attribute name.
|
|
182
|
+
*
|
|
183
|
+
* @private
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
exports.legacyAttributeName = 'googclient_OpenTelemetrySpanContext';
|
|
187
|
+
/**
|
|
188
|
+
* Break down the subscription's full name into its project and ID.
|
|
189
|
+
*
|
|
190
|
+
* @private
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
function getSubscriptionInfo(fullName) {
|
|
194
|
+
const results = fullName.match(/projects\/([^/]+)\/subscriptions\/(.+)/);
|
|
195
|
+
if (!(results === null || results === void 0 ? void 0 : results[0])) {
|
|
196
|
+
return {
|
|
197
|
+
subName: fullName,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
subName: fullName,
|
|
202
|
+
projectId: results[1],
|
|
203
|
+
subId: results[2],
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Break down the subscription's full name into its project and ID.
|
|
208
|
+
*
|
|
209
|
+
* @private
|
|
210
|
+
* @internal
|
|
211
|
+
*/
|
|
212
|
+
function getTopicInfo(fullName) {
|
|
213
|
+
const results = fullName.match(/projects\/([^/]+)\/topics\/(.+)/);
|
|
214
|
+
if (!(results === null || results === void 0 ? void 0 : results[0])) {
|
|
215
|
+
return {
|
|
216
|
+
topicName: fullName,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
topicName: fullName,
|
|
221
|
+
projectId: results[1],
|
|
222
|
+
topicId: results[2],
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
// Determines if a trace is to be sampled. There doesn't appear to be a sanctioned
|
|
226
|
+
// way to do this currently (isRecording does something different).
|
|
227
|
+
//
|
|
228
|
+
// Based on this: https://github.com/open-telemetry/opentelemetry-js/issues/4193
|
|
229
|
+
function isSampled(span) {
|
|
230
|
+
const FLAG_MASK_SAMPLED = 0x1;
|
|
231
|
+
const spanContext = span.spanContext();
|
|
232
|
+
const traceFlags = spanContext === null || spanContext === void 0 ? void 0 : spanContext.traceFlags;
|
|
233
|
+
const sampled = !!(traceFlags && (traceFlags & FLAG_MASK_SAMPLED) === FLAG_MASK_SAMPLED);
|
|
234
|
+
return sampled;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Contains utility methods for creating spans.
|
|
238
|
+
*
|
|
239
|
+
* @private
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
242
|
+
class PubsubSpans {
|
|
243
|
+
static createAttributes(params, message, caller) {
|
|
244
|
+
var _a, _b, _c, _d;
|
|
245
|
+
const destinationName = (_a = params.topicName) !== null && _a !== void 0 ? _a : params.subName;
|
|
246
|
+
const destinationId = (_b = params.topicId) !== null && _b !== void 0 ? _b : params.subId;
|
|
247
|
+
const projectId = params.projectId;
|
|
248
|
+
// Purposefully leaving this debug check here as a comment - this should
|
|
249
|
+
// always be true, but we don't want to fail in prod if it's not.
|
|
250
|
+
/*if (
|
|
251
|
+
(params.topicName && params.subName) ||
|
|
252
|
+
(!destinationName && !projectId && !destinationId)
|
|
253
|
+
) {
|
|
254
|
+
throw new Error(
|
|
255
|
+
'One of topicName or subName must be specified, and must be fully qualified'
|
|
256
|
+
);
|
|
257
|
+
}*/
|
|
258
|
+
const spanAttributes = {
|
|
259
|
+
// Add Opentelemetry semantic convention attributes to the span, based on:
|
|
260
|
+
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.1.0/specification/trace/semantic_conventions/messaging.md
|
|
261
|
+
['messaging.system']: 'gcp_pubsub',
|
|
262
|
+
['messaging.destination.name']: destinationId !== null && destinationId !== void 0 ? destinationId : destinationName,
|
|
263
|
+
['gcp.project_id']: projectId,
|
|
264
|
+
['code.function']: caller !== null && caller !== void 0 ? caller : 'unknown',
|
|
265
|
+
};
|
|
266
|
+
if (message) {
|
|
267
|
+
if (message.calculatedSize) {
|
|
268
|
+
spanAttributes['messaging.message.envelope.size'] =
|
|
269
|
+
message.calculatedSize;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
if ((_c = message.data) === null || _c === void 0 ? void 0 : _c.length) {
|
|
273
|
+
spanAttributes['messaging.message.envelope.size'] =
|
|
274
|
+
(_d = message.data) === null || _d === void 0 ? void 0 : _d.length;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (message.orderingKey) {
|
|
278
|
+
spanAttributes['messaging.gcp_pubsub.message.ordering_key'] =
|
|
279
|
+
message.orderingKey;
|
|
280
|
+
}
|
|
281
|
+
if (message.isExactlyOnceDelivery) {
|
|
282
|
+
spanAttributes['messaging.gcp_pubsub.message.exactly_once_delivery'] =
|
|
283
|
+
message.isExactlyOnceDelivery;
|
|
284
|
+
}
|
|
285
|
+
if (message.ackId) {
|
|
286
|
+
spanAttributes['messaging.gcp_pubsub.message.ack_id'] = message.ackId;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return spanAttributes;
|
|
290
|
+
}
|
|
291
|
+
static createPublisherSpan(message, topicName, caller) {
|
|
292
|
+
if (!globallyEnabled) {
|
|
293
|
+
return undefined;
|
|
294
|
+
}
|
|
295
|
+
const topicInfo = getTopicInfo(topicName);
|
|
296
|
+
const span = getTracer().startSpan(`${topicName} create`, {
|
|
297
|
+
kind: api_1.SpanKind.PRODUCER,
|
|
298
|
+
attributes: PubsubSpans.createAttributes(topicInfo, message, caller),
|
|
299
|
+
});
|
|
300
|
+
if (topicInfo.topicId) {
|
|
301
|
+
span.updateName(`${topicInfo.topicId} create`);
|
|
302
|
+
span.setAttribute('messaging.destination.name', topicInfo.topicId);
|
|
303
|
+
}
|
|
304
|
+
return span;
|
|
305
|
+
}
|
|
306
|
+
static updatePublisherTopicName(span, topicName) {
|
|
307
|
+
const topicInfo = getTopicInfo(topicName);
|
|
308
|
+
if (topicInfo.topicId) {
|
|
309
|
+
span.updateName(`${topicInfo.topicId} create`);
|
|
310
|
+
span.setAttribute('messaging.destination.name', topicInfo.topicId);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
span.updateName(`${topicName} create`);
|
|
314
|
+
}
|
|
315
|
+
if (topicInfo.projectId) {
|
|
316
|
+
span.setAttribute('gcp.project_id', topicInfo.projectId);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
static createReceiveSpan(message, subName, parent, caller) {
|
|
320
|
+
var _a;
|
|
321
|
+
if (!globallyEnabled) {
|
|
322
|
+
return undefined;
|
|
323
|
+
}
|
|
324
|
+
const subInfo = getSubscriptionInfo(subName);
|
|
325
|
+
const name = `${(_a = subInfo.subId) !== null && _a !== void 0 ? _a : subName} subscribe`;
|
|
326
|
+
const attributes = this.createAttributes(subInfo, message, caller);
|
|
327
|
+
if (subInfo.subId) {
|
|
328
|
+
attributes['messaging.destination.name'] = subInfo.subId;
|
|
329
|
+
}
|
|
330
|
+
if (api_1.context) {
|
|
331
|
+
return getTracer().startSpan(name, {
|
|
332
|
+
kind: api_1.SpanKind.CONSUMER,
|
|
333
|
+
attributes,
|
|
334
|
+
}, parent);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
return getTracer().startSpan(name, {
|
|
338
|
+
kind: api_1.SpanKind.CONSUMER,
|
|
339
|
+
attributes,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
static createChildSpan(name, message, parentSpan, attributes) {
|
|
344
|
+
var _a;
|
|
345
|
+
if (!globallyEnabled) {
|
|
346
|
+
return undefined;
|
|
347
|
+
}
|
|
348
|
+
const parent = (_a = message === null || message === void 0 ? void 0 : message.parentSpan) !== null && _a !== void 0 ? _a : parentSpan;
|
|
349
|
+
if (parent) {
|
|
350
|
+
return getTracer().startSpan(name, {
|
|
351
|
+
kind: api_1.SpanKind.INTERNAL,
|
|
352
|
+
attributes: attributes !== null && attributes !== void 0 ? attributes : {},
|
|
353
|
+
}, spanContextToContext(parent.spanContext()));
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
return undefined;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
static createPublishFlowSpan(message) {
|
|
360
|
+
return PubsubSpans.createChildSpan('publisher flow control', message);
|
|
361
|
+
}
|
|
362
|
+
static createPublishSchedulerSpan(message) {
|
|
363
|
+
return PubsubSpans.createChildSpan('publisher batching', message);
|
|
364
|
+
}
|
|
365
|
+
static createPublishRpcSpan(messages, topicName, caller) {
|
|
366
|
+
if (!globallyEnabled) {
|
|
367
|
+
return undefined;
|
|
368
|
+
}
|
|
369
|
+
const spanAttributes = PubsubSpans.createAttributes(getTopicInfo(topicName), undefined, caller);
|
|
370
|
+
const links = messages
|
|
371
|
+
.filter(m => m.parentSpan && isSampled(m.parentSpan))
|
|
372
|
+
.map(m => ({ context: m.parentSpan.spanContext() }))
|
|
373
|
+
.filter(l => l.context);
|
|
374
|
+
const span = getTracer().startSpan(`${topicName} send`, {
|
|
375
|
+
kind: api_1.SpanKind.PRODUCER,
|
|
376
|
+
attributes: spanAttributes,
|
|
377
|
+
links,
|
|
378
|
+
}, api_1.ROOT_CONTEXT);
|
|
379
|
+
span === null || span === void 0 ? void 0 : span.setAttribute('messaging.batch.message_count', messages.length);
|
|
380
|
+
if (span) {
|
|
381
|
+
// Also attempt to link from message spans back to the publish RPC span.
|
|
382
|
+
messages.forEach(m => {
|
|
383
|
+
if (m.parentSpan && isSampled(m.parentSpan)) {
|
|
384
|
+
m.parentSpan.addLink({ context: span.spanContext() });
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
return span;
|
|
389
|
+
}
|
|
390
|
+
static createAckRpcSpan(messageSpans, subName, caller) {
|
|
391
|
+
var _a;
|
|
392
|
+
if (!globallyEnabled) {
|
|
393
|
+
return undefined;
|
|
394
|
+
}
|
|
395
|
+
const subInfo = getSubscriptionInfo(subName);
|
|
396
|
+
const spanAttributes = PubsubSpans.createAttributes(subInfo, undefined, caller);
|
|
397
|
+
const links = messageSpans
|
|
398
|
+
.filter(m => m && isSampled(m))
|
|
399
|
+
.map(m => ({ context: m.spanContext() }))
|
|
400
|
+
.filter(l => l.context);
|
|
401
|
+
const span = getTracer().startSpan(`${(_a = subInfo.subId) !== null && _a !== void 0 ? _a : subInfo.subName} ack`, {
|
|
402
|
+
kind: api_1.SpanKind.CONSUMER,
|
|
403
|
+
attributes: spanAttributes,
|
|
404
|
+
links,
|
|
405
|
+
}, api_1.ROOT_CONTEXT);
|
|
406
|
+
span === null || span === void 0 ? void 0 : span.setAttribute('messaging.batch.message_count', messageSpans.length);
|
|
407
|
+
if (span) {
|
|
408
|
+
// Also attempt to link from the subscribe span(s) back to the publish RPC span.
|
|
409
|
+
messageSpans.forEach(m => {
|
|
410
|
+
if (m && isSampled(m)) {
|
|
411
|
+
m.addLink({ context: span.spanContext() });
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return span;
|
|
416
|
+
}
|
|
417
|
+
static createModackRpcSpan(messageSpans, subName, type, caller, deadline, isInitial) {
|
|
418
|
+
var _a;
|
|
419
|
+
if (!globallyEnabled) {
|
|
420
|
+
return undefined;
|
|
421
|
+
}
|
|
422
|
+
const subInfo = getSubscriptionInfo(subName);
|
|
423
|
+
const spanAttributes = PubsubSpans.createAttributes(subInfo, undefined, caller);
|
|
424
|
+
const links = messageSpans
|
|
425
|
+
.filter(m => m && isSampled(m))
|
|
426
|
+
.map(m => ({ context: m.spanContext() }))
|
|
427
|
+
.filter(l => l.context);
|
|
428
|
+
const span = getTracer().startSpan(`${(_a = subInfo.subId) !== null && _a !== void 0 ? _a : subInfo.subName} ${type}`, {
|
|
429
|
+
kind: api_1.SpanKind.CONSUMER,
|
|
430
|
+
attributes: spanAttributes,
|
|
431
|
+
links,
|
|
432
|
+
}, api_1.ROOT_CONTEXT);
|
|
433
|
+
span === null || span === void 0 ? void 0 : span.setAttribute('messaging.batch.message_count', messageSpans.length);
|
|
434
|
+
if (span) {
|
|
435
|
+
// Also attempt to link from the subscribe span(s) back to the publish RPC span.
|
|
436
|
+
messageSpans.forEach(m => {
|
|
437
|
+
if (m && isSampled(m)) {
|
|
438
|
+
m.addLink({ context: span.spanContext() });
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
if (deadline) {
|
|
443
|
+
span === null || span === void 0 ? void 0 : span.setAttribute('messaging.gcp_pubsub.message.ack_deadline_seconds', deadline.totalOf('second'));
|
|
444
|
+
}
|
|
445
|
+
if (isInitial !== undefined) {
|
|
446
|
+
span === null || span === void 0 ? void 0 : span.setAttribute('messaging.gcp_pubsub.is_receipt_modack', isInitial);
|
|
447
|
+
}
|
|
448
|
+
return span;
|
|
449
|
+
}
|
|
450
|
+
static createReceiveFlowSpan(message) {
|
|
451
|
+
return PubsubSpans.createChildSpan('subscriber concurrency control', message);
|
|
452
|
+
}
|
|
453
|
+
static createReceiveSchedulerSpan(message) {
|
|
454
|
+
return PubsubSpans.createChildSpan('subscriber scheduler', message);
|
|
455
|
+
}
|
|
456
|
+
static createReceiveProcessSpan(message, subName) {
|
|
457
|
+
var _a;
|
|
458
|
+
const subInfo = getSubscriptionInfo(subName);
|
|
459
|
+
return PubsubSpans.createChildSpan(`${(_a = subInfo.subId) !== null && _a !== void 0 ? _a : subName} process`, message);
|
|
460
|
+
}
|
|
461
|
+
static setReceiveProcessResult(span, isAck) {
|
|
462
|
+
span.setAttribute('messaging.gcp_pubsub.result', isAck ? 'ack' : 'nack');
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
exports.PubsubSpans = PubsubSpans;
|
|
466
|
+
/**
|
|
467
|
+
* Creates and manipulates Pub/Sub-related events on spans.
|
|
468
|
+
*
|
|
469
|
+
* @private
|
|
470
|
+
* @internal
|
|
471
|
+
*/
|
|
472
|
+
class PubsubEvents {
|
|
473
|
+
static addEvent(text, message, attributes) {
|
|
474
|
+
const parent = message.parentSpan;
|
|
475
|
+
if (!parent) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
parent.addEvent(text, attributes);
|
|
479
|
+
}
|
|
480
|
+
static publishStart(message) {
|
|
481
|
+
PubsubEvents.addEvent('publish start', message);
|
|
482
|
+
}
|
|
483
|
+
static publishEnd(message) {
|
|
484
|
+
PubsubEvents.addEvent('publish end', message);
|
|
485
|
+
}
|
|
486
|
+
static ackStart(message) {
|
|
487
|
+
PubsubEvents.addEvent('ack start', message);
|
|
488
|
+
}
|
|
489
|
+
static ackEnd(message) {
|
|
490
|
+
PubsubEvents.addEvent('ack end', message);
|
|
491
|
+
}
|
|
492
|
+
static modackStart(message) {
|
|
493
|
+
PubsubEvents.addEvent('modack start', message);
|
|
494
|
+
}
|
|
495
|
+
static modackEnd(message) {
|
|
496
|
+
PubsubEvents.addEvent('modack end', message);
|
|
497
|
+
}
|
|
498
|
+
static nackStart(message) {
|
|
499
|
+
PubsubEvents.addEvent('nack start', message);
|
|
500
|
+
}
|
|
501
|
+
static nackEnd(message) {
|
|
502
|
+
PubsubEvents.addEvent('nack end', message);
|
|
503
|
+
}
|
|
504
|
+
static ackCalled(span) {
|
|
505
|
+
span.addEvent('ack called');
|
|
506
|
+
}
|
|
507
|
+
static nackCalled(span) {
|
|
508
|
+
span.addEvent('nack called');
|
|
509
|
+
}
|
|
510
|
+
static modAckCalled(span, deadline) {
|
|
511
|
+
// User-called modAcks are never initial ones.
|
|
512
|
+
span.addEvent('modack called', {
|
|
513
|
+
'messaging.gcp_pubsub.modack_deadline_seconds': `${deadline.totalOf('second')}`,
|
|
514
|
+
'messaging.gcp_pubsub.is_receipt_modack': 'false',
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
static modAckStart(message, deadline, isInitial) {
|
|
518
|
+
PubsubEvents.addEvent('modack start', message, {
|
|
519
|
+
'messaging.gcp_pubsub.modack_deadline_seconds': `${deadline.totalOf('second')}`,
|
|
520
|
+
'messaging.gcp_pubsub.is_receipt_modack': isInitial ? 'true' : 'false',
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
static modAckEnd(message) {
|
|
524
|
+
PubsubEvents.addEvent('modack end', message);
|
|
525
|
+
}
|
|
526
|
+
// Add this event any time the process is shut down before processing
|
|
527
|
+
// of the message can complete.
|
|
528
|
+
static shutdown(message) {
|
|
529
|
+
PubsubEvents.addEvent('shutdown', message);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
exports.PubsubEvents = PubsubEvents;
|
|
533
|
+
/**
|
|
534
|
+
* Injects the trace context into a Pub/Sub message (or other object with
|
|
535
|
+
* an 'attributes' object) for propagation.
|
|
536
|
+
*
|
|
537
|
+
* This is for the publish side.
|
|
538
|
+
*
|
|
539
|
+
* @private
|
|
540
|
+
* @internal
|
|
541
|
+
*/
|
|
542
|
+
function injectSpan(span, message, enabled) {
|
|
543
|
+
if (!globallyEnabled) {
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
if (!message.attributes) {
|
|
547
|
+
message.attributes = {};
|
|
548
|
+
}
|
|
549
|
+
if (message.attributes[exports.modernAttributeName]) {
|
|
550
|
+
console.warn(`${exports.modernAttributeName} key set as message attribute, but will be overridden.`);
|
|
551
|
+
delete message.attributes[exports.modernAttributeName];
|
|
552
|
+
}
|
|
553
|
+
// If we're in legacy mode, add that header as well.
|
|
554
|
+
if (enabled === OpenTelemetryLevel.Legacy) {
|
|
555
|
+
if (message.attributes[exports.legacyAttributeName]) {
|
|
556
|
+
console.warn(`${exports.legacyAttributeName} key set as message attribute, but will be overridden.`);
|
|
557
|
+
}
|
|
558
|
+
message.attributes[exports.legacyAttributeName] = JSON.stringify(span.spanContext());
|
|
559
|
+
}
|
|
560
|
+
// Always do propagation injection with the trace context.
|
|
561
|
+
const context = api_1.trace.setSpanContext(api_1.ROOT_CONTEXT, span.spanContext());
|
|
562
|
+
api_1.propagation.inject(context, message, exports.pubsubSetter);
|
|
563
|
+
// Also put the direct reference to the Span object for while we're
|
|
564
|
+
// passing it around in the client library.
|
|
565
|
+
message.parentSpan = span;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Returns true if this message potentially contains a span context.
|
|
569
|
+
*
|
|
570
|
+
* @private
|
|
571
|
+
* @internal
|
|
572
|
+
*/
|
|
573
|
+
function containsSpanContext(message) {
|
|
574
|
+
if (message.parentSpan) {
|
|
575
|
+
return true;
|
|
576
|
+
}
|
|
577
|
+
if (!message.attributes) {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
const keys = Object.getOwnPropertyNames(message.attributes);
|
|
581
|
+
return !!keys.find(n => n === exports.legacyAttributeName || n === exports.modernAttributeName);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Extracts the trace context from a Pub/Sub message (or other object with
|
|
585
|
+
* an 'attributes' object) from a propagation, for receive processing. If no
|
|
586
|
+
* context was present, create a new parent span.
|
|
587
|
+
*
|
|
588
|
+
* This is for the receive side.
|
|
589
|
+
*
|
|
590
|
+
* @private
|
|
591
|
+
* @internal
|
|
592
|
+
*/
|
|
593
|
+
function extractSpan(message, subName, enabled) {
|
|
594
|
+
var _a, _b;
|
|
595
|
+
if (!globallyEnabled) {
|
|
596
|
+
return undefined;
|
|
597
|
+
}
|
|
598
|
+
if (message.parentSpan) {
|
|
599
|
+
return message.parentSpan;
|
|
600
|
+
}
|
|
601
|
+
const keys = Object.getOwnPropertyNames((_a = message.attributes) !== null && _a !== void 0 ? _a : {});
|
|
602
|
+
let context;
|
|
603
|
+
if (enabled === OpenTelemetryLevel.Legacy) {
|
|
604
|
+
// Only prefer the legacy attributes to no trace context attribute.
|
|
605
|
+
if (keys.includes(exports.legacyAttributeName) &&
|
|
606
|
+
!keys.includes(exports.modernAttributeName)) {
|
|
607
|
+
const legacyValue = (_b = message.attributes) === null || _b === void 0 ? void 0 : _b[exports.legacyAttributeName];
|
|
608
|
+
if (legacyValue) {
|
|
609
|
+
const parentSpanContext = legacyValue
|
|
610
|
+
? JSON.parse(legacyValue)
|
|
611
|
+
: undefined;
|
|
612
|
+
if (parentSpanContext) {
|
|
613
|
+
context = spanContextToContext(parentSpanContext);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
if (keys.includes(exports.modernAttributeName)) {
|
|
620
|
+
context = api_1.propagation.extract(api_1.ROOT_CONTEXT, message, exports.pubsubGetter);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
const span = PubsubSpans.createReceiveSpan(message, subName, context, 'extractSpan');
|
|
624
|
+
message.parentSpan = span;
|
|
625
|
+
return span;
|
|
626
|
+
}
|
|
627
|
+
// Since these were exported on the main Pub/Sub index in the previous
|
|
628
|
+
// version, we have to export them until the next major.
|
|
629
|
+
exports.legacyExports = {
|
|
630
|
+
/**
|
|
631
|
+
* @deprecated
|
|
632
|
+
* Use the new telemetry functionality instead; see the updated OpenTelemetry
|
|
633
|
+
* sample for an example.
|
|
634
|
+
*/
|
|
635
|
+
createSpan: function (spanName, kind, attributes, parent) {
|
|
636
|
+
if (!globallyEnabled) {
|
|
637
|
+
// This isn't great, but it's the fact of the situation.
|
|
638
|
+
return undefined;
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
return getTracer().startSpan(spanName, {
|
|
642
|
+
kind,
|
|
643
|
+
attributes,
|
|
644
|
+
}, parent ? api_1.trace.setSpanContext(api_1.context.active(), parent) : undefined);
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
};
|
|
648
|
+
//# sourceMappingURL=telemetry-tracing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-tracing.js","sourceRoot":"","sources":["../../src/telemetry-tracing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AA6EH,gDAEC;AAYD,8BAcC;AA2GD,oDAIC;AAwCD,kDAaC;AAQD,oCAaC;AAycD,gCAwCC;AAQD,kDAaC;AAYD,kCA+CC;AAj2BD,4CAa4B;AAO5B,2CAA2C;AAC3C,8DAA8D;AAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD;;;;;GAKG;AACH,IAAI,YAAgC,CAAC;AACrC,SAAS,SAAS;IAChB,MAAM,MAAM,GACV,YAAY,aAAZ,YAAY,cAAZ,YAAY,GACZ,WAAK,CAAC,SAAS,CAAC,sBAAsB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/D,YAAY,GAAG,MAAM,CAAC;IACtB,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,IAAY,kBAkBX;AAlBD,WAAY,kBAAkB;IAC5B;;;OAGG;IACH,2DAAQ,CAAA;IAER;;;;OAIG;IACH,+DAAU,CAAA;IAEV;;OAEG;IACH,+DAAU,CAAA;AACZ,CAAC,EAlBW,kBAAkB,kCAAlB,kBAAkB,QAkB7B;AAED,qEAAqE;AACrE,IAAI,eAAe,GAAG,KAAK,CAAC;AAE5B;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,OAAgB;IACj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