Skip to content

Commit 52b7b61

Browse files
add api guard
1 parent fadb7d3 commit 52b7b61

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/datadog-plugin-google-cloud-pubsub/src

packages/datadog-plugin-google-cloud-pubsub/src/producer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class GoogleCloudPubsubProducerPlugin extends ProducerPlugin {
3838

3939
start (ctx) {
4040
if (!this.config.dsmEnabled) return
41+
if (ctx.api !== 'publish' || !ctx.currentStore) return
4142
const { request } = ctx
4243
const messages = request.messages || []
4344
const topic = request.topic

0 commit comments

Comments
 (0)