diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2017-03-01 14:21:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 14:21:29 +0100 |
commit | b9ce8324400a99e0b055617605c6bebe7def2d9b (patch) | |
tree | 9fc27515ab32b425d7e1a3cdf4252b09a08b1454 /node-admin | |
parent | 854ae6ce37f9f05caafe9b91f634e2ab13c7e8a1 (diff) | |
parent | 9fec4b1aa99e5be39b25072c7360f2b40af9ddb7 (diff) |
Merge pull request #1897 from yahoo/hmusum/add-new-application-dimensions-to-metrics
Add new application dimensions to metrics
Diffstat (limited to 'node-admin')
3 files changed, 21 insertions, 0 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java index 29590dddb05..7d5a1fd524e 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java @@ -498,6 +498,9 @@ public class NodeAgentImpl implements NodeAgent { nodeSpec.owner.ifPresent(owner -> dimensionsBuilder .add("tenantName", owner.tenant) + .add("applicationName", owner.application) + .add("instanceName", owner.instance) + .add("applicationId", owner.tenant + "." + owner.application + "." + owner.instance) .add("app", owner.application + "." + owner.instance)); nodeSpec.membership.ifPresent(membership -> diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentScheduleMakerTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentScheduleMakerTest.java index 3699b48a67b..55e71864bdb 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentScheduleMakerTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentScheduleMakerTest.java @@ -17,6 +17,9 @@ public class SecretAgentScheduleMakerTest { SecretAgentScheduleMaker scheduleMaker = new SecretAgentScheduleMaker("system-checks", 60, Paths.get("/some/test"), "arg1", "arg2 with space") .withTag("tenantName", "vespa") + .withTag("applicationName", "canary-docker") + .withTag("instanceName", "default") + .withTag("applicationId", "vespa.canary-docker.default") .withTag("app", "canary-docker.default") .withTag("clustertype", "container") .withTag("clusterid", "canary") @@ -36,6 +39,9 @@ public class SecretAgentScheduleMakerTest { " - arg2 with space\n" + " tags:\n" + " tenantName: vespa\n" + + " applicationName: canary-docker\n" + + " instanceName: default\n" + + " applicationId: vespa.canary-docker.default\n" + " app: canary-docker.default\n" + " clustertype: container\n" + " clusterid: canary\n" + diff --git a/node-admin/src/test/resources/docker.stats.metrics.expected.json b/node-admin/src/test/resources/docker.stats.metrics.expected.json index dd1e3892ec9..43a00fac9f5 100644 --- a/node-admin/src/test/resources/docker.stats.metrics.expected.json +++ b/node-admin/src/test/resources/docker.stats.metrics.expected.json @@ -3,6 +3,9 @@ "application": "host_life", "dimensions": { "flavor": "docker", + "instanceName": "testinstance", + "applicationId": "tester.testapp.testinstance", + "applicationName": "testapp", "app": "testapp.testinstance", "clustertype": "clustType", "role": "tenants", @@ -29,6 +32,9 @@ "application":"docker", "dimensions":{ "flavor":"docker", + "applicationName": "testapp", + "instanceName": "testinstance", + "applicationId": "tester.testapp.testinstance", "app":"testapp.testinstance", "clustertype":"clustType", "role":"tenants", @@ -55,6 +61,9 @@ "application":"docker", "dimensions":{ "flavor":"docker", + "applicationName": "testapp", + "instanceName": "testinstance", + "applicationId": "tester.testapp.testinstance", "app":"testapp.testinstance", "clustertype":"clustType", "role":"tenants", @@ -82,6 +91,9 @@ "application":"docker", "dimensions":{ "flavor":"docker", + "applicationName": "testapp", + "instanceName": "testinstance", + "applicationId": "tester.testapp.testinstance", "app":"testapp.testinstance", "clustertype":"clustType", "role":"tenants", |