File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
agent-core/src/main/java/cloud/erda/agent/core Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ public class ServiceConfig implements Config {
6868 @ Configuration (name = "POD_IP" )
6969 private String podIp ;
7070
71+ @ Configuration (name = "POD_NAME" )
72+ private String podName ;
73+
74+ @ Configuration (name = "DICE_NAMESPACE" )
75+ private String podNameSpace ;
76+
7177 @ Configuration (name = "MONITOR_JVM_PROFILER_ID" )
7278 private String jvmProfilerId ;
7379
@@ -90,6 +96,18 @@ public String getOrgName() {
9096 return orgName ;
9197 }
9298
99+ public String getPodIP () {
100+ return podIp ;
101+ }
102+
103+ public String getPodName () {
104+ return podName ;
105+ }
106+
107+ public String getPodNameSpace () {
108+ return podNameSpace ;
109+ }
110+
93111 public String getProjectId () {
94112 return projectId ;
95113 }
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ public Metric[] serialize(Span span) {
5555 metric .addTag ("runtime_id" , serviceConfig .getRuntimeId ());
5656 metric .addTag ("org_id" , serviceConfig .getOrgId ());
5757 metric .addTag ("org_name" , serviceConfig .getOrgName ());
58+ metric .addTag ("pod_ip" , serviceConfig .getPodIP ());
59+ metric .addTag ("pod_name" , serviceConfig .getPodName ());
60+ metric .addTag ("pod_namespace" , serviceConfig .getPodNameSpace ());
5861 metric .addTag ("project_name" , serviceConfig .getProjectName ());
5962 metric .addTag ("application_name" , serviceConfig .getApplicationName ());
6063 metric .addTag ("workspace" , serviceConfig .getWorkspace ());
You can’t perform that action at this time.
0 commit comments