@elastic/apm-rum-angular
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.1.1](https://github.com/elastic/apm-agent-rum-js/compare/@elastic/apm-rum-angular@0.1.0...@elastic/apm-rum-angular@0.1.1) (2019-09-17) | ||
### Bug Fixes | ||
* **rum-angular:** proper transaction name for lazy loaded routes ([#414](https://github.com/elastic/apm-agent-rum-js/issues/414)) ([4c6d120](https://github.com/elastic/apm-agent-rum-js/commit/4c6d120)) | ||
# 0.1.0 (2019-09-03) | ||
@@ -8,0 +19,0 @@ |
var _dec, _dec2, _class, _class2, _temp; | ||
import { Router, NavigationStart, NavigationEnd, NavigationError } from '@angular/router'; | ||
import { Router, NavigationStart, NavigationEnd, NavigationError, ActivatedRoute } from '@angular/router'; | ||
import { Injectable } from '@angular/core'; | ||
@@ -8,5 +8,6 @@ import { Promise } from 'es6-promise'; | ||
providedIn: 'root' | ||
}), _dec2 = Reflect.metadata("design:paramtypes", [typeof Router === "undefined" ? Object : Router]), _dec(_class = _dec2(_class = (_temp = _class2 = class ApmService { | ||
constructor(router) { | ||
}), _dec2 = Reflect.metadata("design:paramtypes", [typeof Router === "undefined" ? Object : Router, typeof ActivatedRoute === "undefined" ? Object : ActivatedRoute]), _dec(_class = _dec2(_class = (_temp = _class2 = class ApmService { | ||
constructor(router, route) { | ||
this.router = router; | ||
this.route = route; | ||
} | ||
@@ -41,6 +42,21 @@ | ||
const child = this.router.routerState.root.firstChild; | ||
const route = this.route.firstChild; | ||
if (child && child.snapshot.routeConfig && child.snapshot.routeConfig.path) { | ||
transaction.name = '/' + child.snapshot.routeConfig.path; | ||
if (route) { | ||
let child = route; | ||
let path = '/' + child.routeConfig.path; | ||
while (child) { | ||
child = child.firstChild; | ||
if (child && child.routeConfig) { | ||
const currentPath = child.routeConfig.path; | ||
if (currentPath) { | ||
path += '/' + currentPath; | ||
} | ||
} | ||
} | ||
transaction.name = path; | ||
} | ||
@@ -47,0 +63,0 @@ |
@@ -16,5 +16,6 @@ "use strict"; | ||
providedIn: 'root' | ||
}), _dec2 = Reflect.metadata("design:paramtypes", [typeof _router.Router === "undefined" ? Object : _router.Router]), _dec(_class = _dec2(_class = (_temp = _class2 = class ApmService { | ||
constructor(router) { | ||
}), _dec2 = Reflect.metadata("design:paramtypes", [typeof _router.Router === "undefined" ? Object : _router.Router, typeof _router.ActivatedRoute === "undefined" ? Object : _router.ActivatedRoute]), _dec(_class = _dec2(_class = (_temp = _class2 = class ApmService { | ||
constructor(router, route) { | ||
this.router = router; | ||
this.route = route; | ||
} | ||
@@ -49,6 +50,21 @@ | ||
const child = this.router.routerState.root.firstChild; | ||
const route = this.route.firstChild; | ||
if (child && child.snapshot.routeConfig && child.snapshot.routeConfig.path) { | ||
transaction.name = '/' + child.snapshot.routeConfig.path; | ||
if (route) { | ||
let child = route; | ||
let path = '/' + child.routeConfig.path; | ||
while (child) { | ||
child = child.firstChild; | ||
if (child && child.routeConfig) { | ||
const currentPath = child.routeConfig.path; | ||
if (currentPath) { | ||
path += '/' + currentPath; | ||
} | ||
} | ||
} | ||
transaction.name = path; | ||
} | ||
@@ -55,0 +71,0 @@ |
{ | ||
"name": "@elastic/apm-rum-angular", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Elastic APM Real User Monitoring for Angular applications", | ||
@@ -38,3 +38,3 @@ "homepage": "https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html", | ||
"dependencies": { | ||
"@elastic/apm-rum": "^4.4.3", | ||
"@elastic/apm-rum": "^4.4.4", | ||
"es6-promise": "^4.2.8" | ||
@@ -46,3 +46,3 @@ }, | ||
}, | ||
"gitHead": "316915e58a40c33295c8146eaccde76d87bf82c3" | ||
"gitHead": "cb3e0338a953daa5705d321de33c11f4a180e56e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15563
118
1
Updated@elastic/apm-rum@^4.4.4