@@ -15,7 +15,6 @@ const props = require('../util/properties')
15
15
const Timer = require ( '../timer' )
16
16
const Trace = require ( './trace' )
17
17
const synthetics = require ( '../synthetics' )
18
- const url = require ( 'url' )
19
18
const urltils = require ( '../util/urltils' )
20
19
const TraceContext = require ( './tracecontext' ) . TraceContext
21
20
const Logs = require ( './logs' )
@@ -609,49 +608,6 @@ Transaction.prototype.getFullName = function getFullName() {
609
608
return fullName
610
609
}
611
610
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
-
655
611
/**
656
612
* The instrumentation associates metrics with the different kinds of trace
657
613
* segments. The metrics recorders are dependent on the transaction name to
0 commit comments