Skip to content

Commit 505588b

Browse files
committed
add debug log
1 parent 1f91079 commit 505588b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/datadog-instrumentations/src/google-cloud-pubsub.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ const {
55
addHook
66
} = require('./helpers/instrument')
77
const shimmer = require('../../datadog-shimmer')
8+
const log = require('../../dd-trace/src/log')
89

910
// Auto-load push subscription plugin to enable pubsub.delivery spans for push subscriptions
1011
try {
1112
const PushSubscriptionPlugin = require('../../datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription')
1213
new PushSubscriptionPlugin(null, {}).configure({})
13-
} catch {
14+
} catch (e) {
1415
// Push subscription plugin is optional
16+
log.debug(`PushSubscriptionPlugin not loaded: ${e.message}`)
1517
}
1618

1719
const requestStartCh = channel('apm:google-cloud-pubsub:request:start')

0 commit comments

Comments
 (0)