Skip to content

Commit 32e25b1

Browse files
committed
agents: add nsolidVersion attr to metrics
Instead of using kProcessRuntimeDescription. PR-URL: #477 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent efcbf3f commit 32e25b1

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

agents/otlp/src/otlp_common.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ static ResourceAttributes GetMetadataResourceAttributes(const json& info) {
193193
version_it = it->find("nsolid");
194194
if (version_it != it->end() && version_it->is_string()) {
195195
std::string nsolid_version = version_it->get<std::string>();
196-
attrs.SetAttribute(kProcessRuntimeDescription,
197-
"N|Solid " + nsolid_version);
196+
attrs.SetAttribute("nsolidVersion", std::move(nsolid_version));
198197
}
199198
}
200199

test/agents/test-otlp-grpc-metrics.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@ if (process.argv[2] === 'child') {
476476
'main': { type: 'stringValue', value: nsolidInfo.main },
477477
'deployment.environment.name': { type: 'stringValue', value: nsolidInfo.nodeEnv },
478478
'process.runtime.version': { type: 'stringValue', value: nsolidInfo.versions.node },
479-
'process.runtime.description': {
479+
'nsolidVersion': {
480480
type: 'stringValue',
481-
value: `N|Solid ${nsolidInfo.versions.nsolid}`,
481+
value: nsolidInfo.versions.nsolid,
482482
},
483483
'process.runtime.name': { type: 'stringValue', value: 'nodejs' },
484484
'cpuCores': { type: 'intValue', value: `${nsolidInfo.cpuCores}` },

test/agents/test-otlp-metrics.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ if (process.argv[2] === 'child') {
478478
'main': { type: 'stringValue', value: nsolidInfo.main },
479479
'deployment.environment.name': { type: 'stringValue', value: nsolidInfo.nodeEnv },
480480
'process.runtime.version': { type: 'stringValue', value: nsolidInfo.versions.node },
481-
'process.runtime.description': {
481+
'nsolidVersion': {
482482
type: 'stringValue',
483-
value: `N|Solid ${nsolidInfo.versions.nsolid}`,
483+
value: nsolidInfo.versions.nsolid,
484484
},
485485
'process.runtime.name': { type: 'stringValue', value: 'nodejs' },
486486
'cpuCores': { type: 'intValue', value: `${nsolidInfo.cpuCores}` },

test/common/nsolid-grpc-agent/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function checkResource(resource, agentId, config, metrics, info) {
8585
expectedAttributes.main = info.main;
8686
expectedAttributes['deployment.environment.name'] = info.nodeEnv;
8787
expectedAttributes['process.runtime.version'] = info.versions.node;
88-
expectedAttributes['process.runtime.description'] = `N|Solid ${info.versions.nsolid}`;
88+
expectedAttributes.nsolidVersion = info.versions.nsolid;
8989
expectedAttributes['process.runtime.name'] = 'nodejs';
9090
expectedAttributes['host.cpu.model.name'] = info.cpuModel;
9191
expectedAttributes['process.creation.time'] =

0 commit comments

Comments
 (0)