@google-cloud/pubsub 4.3.1 → 4.3.3-otel-beta.1

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.
Files changed (56) hide show
  1. package/README.md +2 -0
  2. package/build/protos/google/pubsub/v1/pubsub.proto +8 -4
  3. package/build/protos/protos.d.ts +15 -0
  4. package/build/protos/protos.js +71 -5
  5. package/build/protos/protos.json +32 -1
  6. package/build/src/iam.d.ts +11 -2
  7. package/build/src/iam.js +12 -2
  8. package/build/src/iam.js.map +1 -1
  9. package/build/src/index.d.ts +2 -0
  10. package/build/src/index.js +5 -1
  11. package/build/src/index.js.map +1 -1
  12. package/build/src/lease-manager.d.ts +2 -2
  13. package/build/src/lease-manager.js +19 -3
  14. package/build/src/lease-manager.js.map +1 -1
  15. package/build/src/message-queues.d.ts +8 -3
  16. package/build/src/message-queues.js +17 -8
  17. package/build/src/message-queues.js.map +1 -1
  18. package/build/src/publisher/flow-publisher.js +5 -0
  19. package/build/src/publisher/flow-publisher.js.map +1 -1
  20. package/build/src/publisher/index.d.ts +3 -2
  21. package/build/src/publisher/index.js +23 -45
  22. package/build/src/publisher/index.js.map +1 -1
  23. package/build/src/publisher/message-batch.d.ts +7 -1
  24. package/build/src/publisher/message-batch.js +11 -1
  25. package/build/src/publisher/message-batch.js.map +1 -1
  26. package/build/src/publisher/message-queues.js +32 -6
  27. package/build/src/publisher/message-queues.js.map +1 -1
  28. package/build/src/publisher/pubsub-message.d.ts +36 -1
  29. package/build/src/publisher/pubsub-message.js +26 -1
  30. package/build/src/publisher/pubsub-message.js.map +1 -1
  31. package/build/src/pubsub.js +0 -14
  32. package/build/src/pubsub.js.map +1 -1
  33. package/build/src/subscriber.d.ts +72 -6
  34. package/build/src/subscriber.js +179 -51
  35. package/build/src/subscriber.js.map +1 -1
  36. package/build/src/subscription.d.ts +4 -2
  37. package/build/src/subscription.js +7 -4
  38. package/build/src/subscription.js.map +1 -1
  39. package/build/src/telemetry-tracing.d.ts +222 -0
  40. package/build/src/telemetry-tracing.js +543 -0
  41. package/build/src/telemetry-tracing.js.map +1 -0
  42. package/build/src/topic.d.ts +2 -1
  43. package/build/src/topic.js +8 -4
  44. package/build/src/topic.js.map +1 -1
  45. package/build/src/v1/publisher_client.d.ts +1 -2
  46. package/build/src/v1/publisher_client.js +10 -7
  47. package/build/src/v1/publisher_client.js.map +1 -1
  48. package/build/src/v1/schema_service_client.js +10 -7
  49. package/build/src/v1/schema_service_client.js.map +1 -1
  50. package/build/src/v1/subscriber_client.js +10 -7
  51. package/build/src/v1/subscriber_client.js.map +1 -1
  52. package/package.json +8 -7
  53. package/CHANGELOG.md +0 -1480
  54. package/build/src/opentelemetry-tracing.d.ts +0 -23
  55. package/build/src/opentelemetry-tracing.js +0 -42
  56. package/build/src/opentelemetry-tracing.js.map +0 -1
@@ -1,23 +0,0 @@
1
- /*!
2
- * Copyright 2020 Google LLC
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
- import { SpanAttributes, SpanContext, Span, SpanKind } from '@opentelemetry/api';
16
- /**
17
- * Creates a new span with the given properties
18
- *
19
- * @param {string} spanName the name for the span
20
- * @param {Attributes?} attributes an object containing the attributes to be set for the span
21
- * @param {SpanContext?} parent the context of the parent span to link to the span
22
- */
23
- export declare function createSpan(spanName: string, kind: SpanKind, attributes?: SpanAttributes, parent?: SpanContext): Span;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright 2020 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.createSpan = void 0;
18
- const api_1 = require("@opentelemetry/api");
19
- // eslint-disable-next-line @typescript-eslint/no-var-requires
20
- const PKG = require('../../package.json');
21
- /**
22
- * @internal
23
- * Instantiates a Opentelemetry tracer for the library
24
- */
25
- const libraryTracer = api_1.trace.getTracer('@google-cloud/pubsub', PKG.version);
26
- /**
27
- * Creates a new span with the given properties
28
- *
29
- * @param {string} spanName the name for the span
30
- * @param {Attributes?} attributes an object containing the attributes to be set for the span
31
- * @param {SpanContext?} parent the context of the parent span to link to the span
32
- */
33
- function createSpan(spanName, kind, attributes, parent) {
34
- return libraryTracer.startSpan(spanName, {
35
- // set the kind of the span
36
- kind,
37
- // set the attributes of the span
38
- attributes: attributes,
39
- }, parent ? api_1.trace.setSpanContext(api_1.context.active(), parent) : undefined);
40
- }
41
- exports.createSpan = createSpan;
42
- //# sourceMappingURL=opentelemetry-tracing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opentelemetry-tracing.js","sourceRoot":"","sources":["../../src/opentelemetry-tracing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,4CAQ4B;AAE5B,8DAA8D;AAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE1C;;;GAGG;AACH,MAAM,aAAa,GAAW,WAAK,CAAC,SAAS,CAC3C,sBAAsB,EACtB,GAAG,CAAC,OAAO,CACZ,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,UAAU,CACxB,QAAgB,EAChB,IAAc,EACd,UAA2B,EAC3B,MAAoB;IAEpB,OAAO,aAAa,CAAC,SAAS,CAC5B,QAAQ,EACR;QACE,2BAA2B;QAC3B,IAAI;QACJ,iCAAiC;QACjC,UAAU,EAAE,UAAU;KACvB,EACD,MAAM,CAAC,CAAC,CAAC,WAAK,CAAC,cAAc,CAAC,aAAO,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CACpE,CAAC;AACJ,CAAC;AAhBD,gCAgBC"}