Skip to content

Commit d0dbb46

Browse files
committed
fix(metrics): fix serviceKey check for metrics
1 parent 1e78981 commit d0dbb46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/agent/api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ CollectorApi.prototype.sendApmMetrics = function (data) {
107107
}
108108

109109
CollectorApi.prototype.sendExternalEdgeMetrics = function (data) {
110-
if (isNaN(this.serviceKey)) {
110+
if (!isNumber(this.serviceKey)) {
111111
debug('Service id not present, cannot send metrics')
112112
return
113113
}
@@ -117,7 +117,7 @@ CollectorApi.prototype.sendExternalEdgeMetrics = function (data) {
117117
}
118118

119119
CollectorApi.prototype.sendIncomingEdgeMetrics = function (data) {
120-
if (isNaN(this.serviceKey)) {
120+
if (!isNumber(this.serviceKey)) {
121121
debug('Service id not present, cannot send metrics')
122122
return
123123
}

0 commit comments

Comments
 (0)