Skip to content

Commit cb4e2f7

Browse files
authored
chore: Removed unused transaction method (#2986)
1 parent 4e61e09 commit cb4e2f7

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

lib/transaction/index.js

-44
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const props = require('../util/properties')
1515
const Timer = require('../timer')
1616
const Trace = require('./trace')
1717
const synthetics = require('../synthetics')
18-
const url = require('url')
1918
const urltils = require('../util/urltils')
2019
const TraceContext = require('./tracecontext').TraceContext
2120
const Logs = require('./logs')
@@ -609,49 +608,6 @@ Transaction.prototype.getFullName = function getFullName() {
609608
return fullName
610609
}
611610

612-
/**
613-
* Returns the full URL of the transaction with query, search, or hash portions
614-
* removed. This is only applicable for web transactions.
615-
*
616-
* Caches to ._scrubbedUrl, pulls in from .parsedUrl if it is available,
617-
* otherwise it will parse .url, store it on .parsedUrl, then scrub the URL and
618-
* store it in the cache.
619-
*
620-
* @returns {(string|undefined)} Returns a string or undefined.
621-
*/
622-
Transaction.prototype.getScrubbedUrl = function getScrubbedUrl() {
623-
if (!this.isWeb()) {
624-
return
625-
}
626-
if (this._scrubbedUrl) {
627-
return this._scrubbedUrl
628-
}
629-
630-
// If we don't have a parsedUrl, lets populate it from .url
631-
if (!this.parsedUrl) {
632-
// At time of writing .url should always be set by the time we get here
633-
// because that is what .isWeb() checks against. In the future it may be
634-
// instead checking a enum or other property so guard ourselves just in
635-
// case.
636-
if (!this.url) {
637-
return
638-
}
639-
640-
this.parsedUrl = url.parse(this.url)
641-
}
642-
643-
const scrubbedParsedUrl = Object.assign(Object.create(null), this.parsedUrl)
644-
scrubbedParsedUrl.search = null
645-
scrubbedParsedUrl.query = null
646-
scrubbedParsedUrl.href = null
647-
scrubbedParsedUrl.path = null
648-
scrubbedParsedUrl.hash = null
649-
650-
this._scrubbedUrl = url.format(scrubbedParsedUrl)
651-
652-
return this._scrubbedUrl
653-
}
654-
655611
/**
656612
* The instrumentation associates metrics with the different kinds of trace
657613
* segments. The metrics recorders are dependent on the transaction name to

0 commit comments

Comments
 (0)