We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06ba451 commit cc67a0eCopy full SHA for cc67a0e
src/models/pubsub/pubsub-client.model.ts
@@ -1,5 +1,6 @@
1
import { PubSub } from '@google-cloud/pubsub';
2
import { timeout } from '../../util/timeout';
3
+import { context, propagation } from '@opentelemetry/api';
4
5
const PUBLISH_TIMEOUT = 10_000;
6
@@ -17,6 +18,8 @@ export class PubSubClient<T> {
17
18
throw new Error('No pubsub topic name provided.');
19
}
20
21
+ propagation.inject(context.active(), message);
22
+
23
const json = JSON.stringify(message);
24
const dataBuffer = Buffer.from(json);
25
const topic = this.client.topic(this.topicName);
0 commit comments