Skip to content

Commit

Permalink
Update OTEL_K8S_NAMESPACE_NAME (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 authored Dec 4, 2023
1 parent bc95d54 commit 7611153
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private Map<String, String> setNacosPropertiesCallback() {

String clusterId = Objects.isNull(System.getenv("OTEL_K8S_CLUSTER_UID")) ? "" : System.getenv("OTEL_K8S_CLUSTER_UID");
String podName = Objects.isNull(System.getenv("OTEL_RESOURCE_ATTRIBUTES_POD_NAME")) ? "" : System.getenv("OTEL_RESOURCE_ATTRIBUTES_POD_NAME");
String k8sNamespace = Objects.isNull(System.getenv("K8S_NAMESPACE")) ? "" : System.getenv("K8S_NAMESPACE");
String k8sNamespace = Objects.isNull(System.getenv("OTEL_K8S_NAMESPACE_NAME")) ? "" : System.getenv("OTEL_K8S_NAMESPACE_NAME");

//TODO: if com.alibaba.cloud.nacos.discovery.NacosDiscoveryAutoConfiguration claszz not found, do not set properties.
properties.put("spring.cloud.nacos.discovery.metadata.k8s_cluster_id", clusterId);
Expand Down

0 comments on commit 7611153

Please sign in to comment.