Skip to content

Commit

Permalink
remove tracingChannel map
Browse files Browse the repository at this point in the history
  • Loading branch information
Cris Naranjo authored and tlhunter committed Aug 26, 2024
1 parent 1a3a9c8 commit d80cd1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/datadog-instrumentations/src/hapi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict'

const tracingChannel = require('dc-polyfill').tracingChannel
const shimmer = require('../../datadog-shimmer')
const { addHook, channel, tracingChannel } = require('./helpers/instrument')
const { addHook, channel } = require('./helpers/instrument')

const handleChannel = channel('apm:hapi:request:handle')
const routeChannel = channel('apm:hapi:request:route')
Expand Down
9 changes: 0 additions & 9 deletions packages/datadog-instrumentations/src/helpers/instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ exports.channel = function (name) {
return ch
}

const tracingChannelMap = {}
exports.tracingChannel = function (name) {
const maybe = tracingChannelMap[name]
if (maybe) return maybe
const ch = dc.tracingChannel(name)
tracingChannelMap[name] = ch
return ch
}

/**
* @param {string} args.name module name
* @param {string[]} args.versions array of semver range strings
Expand Down

0 comments on commit d80cd1b

Please sign in to comment.