diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/combined_v1_v2_eks_config.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/combined_v1_v2_eks_config.yaml index 6aa73a976ea..2a58466eae4 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/combined_v1_v2_eks_config.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/combined_v1_v2_eks_config.yaml @@ -1336,6 +1336,11 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil + - context: resource + statements: + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil transform/cw_k8s_ci_v0_dcgm_promote: error_mode: ignore metric_statements: @@ -1351,6 +1356,19 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - delete_key(attributes, "Hostname") where attributes["Hostname"] != nil - delete_key(attributes, "pci_bus_id") where attributes["pci_bus_id"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ebs_csi_promote: error_mode: ignore metric_statements: @@ -2873,6 +2891,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -2896,6 +2915,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -2917,6 +2937,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -2971,6 +2992,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -2990,6 +3012,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name - filter/cw_k8s_ci_v0_neuron @@ -3015,6 +3038,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -3047,12 +3071,12 @@ service: - ec2tagger - awsentity/resource receivers: - - telegraf_netstat - - telegraf_disk - telegraf_swap - telegraf_processes - - telegraf_cpu - telegraf_procstat/1917393364 + - telegraf_cpu + - telegraf_disk + - telegraf_netstat - telegraf_mem metrics/host_metrics: exporters: @@ -3078,8 +3102,8 @@ service: - ec2tagger - awsentity/resource receivers: - - telegraf_net - telegraf_diskio + - telegraf_net metrics/opentelemetry: exporters: - otlp_http/metrics diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config.yaml index 00e352ae86d..382744b501e 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config.yaml @@ -783,6 +783,14 @@ processors: - context: datapoint statements: - set(resource.attributes["k8s.apiserver.version"], attributes["git_version"]) where attributes["git_version"] != nil and attributes["git_version"] != "" + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ksm_clean_resource: error_mode: ignore metric_statements: @@ -830,6 +838,21 @@ processors: - set(attributes["cronjob"], resource.attributes["cronjob"]) where resource.attributes["cronjob"] != nil - set(attributes["owner_name"], resource.attributes["owner_name"]) where resource.attributes["owner_name"] != nil - set(attributes["owner_kind"], resource.attributes["owner_kind"]) where resource.attributes["owner_kind"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil + - delete_key(attributes, "uid") where attributes["uid"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "owner_name") where attributes["owner_name"] != nil + - delete_key(attributes, "owner_kind") where attributes["owner_kind"] != nil + - delete_key(attributes, "deployment") where attributes["deployment"] != nil + - delete_key(attributes, "daemonset") where attributes["daemonset"] != nil + - delete_key(attributes, "statefulset") where attributes["statefulset"] != nil + - delete_key(attributes, "replicaset") where attributes["replicaset"] != nil + - delete_key(attributes, "job_name") where attributes["job_name"] != nil + - delete_key(attributes, "cronjob") where attributes["cronjob"] != nil transform/cw_k8s_ci_v0_mark_cluster: error_mode: ignore metric_statements: @@ -951,14 +974,16 @@ processors: - set(attributes["k8s.pod.name"], attributes["pod"]) where attributes["pod"] != nil - set(attributes["k8s.namespace.name"], attributes["namespace"]) where attributes["namespace"] != nil - set(attributes["k8s.node.name"], attributes["node"]) where attributes["node"] != nil - - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil - - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil - - delete_key(attributes, "url.scheme") where attributes["url.scheme"] != nil - context: datapoint statements: - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil - set(attributes["node"], resource.attributes["node"]) where resource.attributes["node"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil transform/identity: error_mode: ignore flatten_data: false @@ -1250,6 +1275,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_apiserver_extract_version @@ -1270,6 +1296,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_karpenter @@ -1289,6 +1316,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - filter/cw_k8s_ci_v0_keda_drop_non_keda - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 @@ -1309,6 +1337,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_kube_state_metrics diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_aks.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_aks.yaml index 1ce205360f9..0d20d465d52 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_aks.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_aks.yaml @@ -781,6 +781,14 @@ processors: - context: datapoint statements: - set(resource.attributes["k8s.apiserver.version"], attributes["git_version"]) where attributes["git_version"] != nil and attributes["git_version"] != "" + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ksm_clean_resource: error_mode: ignore metric_statements: @@ -828,6 +836,21 @@ processors: - set(attributes["cronjob"], resource.attributes["cronjob"]) where resource.attributes["cronjob"] != nil - set(attributes["owner_name"], resource.attributes["owner_name"]) where resource.attributes["owner_name"] != nil - set(attributes["owner_kind"], resource.attributes["owner_kind"]) where resource.attributes["owner_kind"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil + - delete_key(attributes, "uid") where attributes["uid"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "owner_name") where attributes["owner_name"] != nil + - delete_key(attributes, "owner_kind") where attributes["owner_kind"] != nil + - delete_key(attributes, "deployment") where attributes["deployment"] != nil + - delete_key(attributes, "daemonset") where attributes["daemonset"] != nil + - delete_key(attributes, "statefulset") where attributes["statefulset"] != nil + - delete_key(attributes, "replicaset") where attributes["replicaset"] != nil + - delete_key(attributes, "job_name") where attributes["job_name"] != nil + - delete_key(attributes, "cronjob") where attributes["cronjob"] != nil transform/cw_k8s_ci_v0_mark_cluster: error_mode: ignore metric_statements: @@ -949,14 +972,16 @@ processors: - set(attributes["k8s.pod.name"], attributes["pod"]) where attributes["pod"] != nil - set(attributes["k8s.namespace.name"], attributes["namespace"]) where attributes["namespace"] != nil - set(attributes["k8s.node.name"], attributes["node"]) where attributes["node"] != nil - - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil - - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil - - delete_key(attributes, "url.scheme") where attributes["url.scheme"] != nil - context: datapoint statements: - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil - set(attributes["node"], resource.attributes["node"]) where resource.attributes["node"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil transform/identity: error_mode: ignore flatten_data: false @@ -1249,6 +1274,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_apiserver_extract_version @@ -1269,6 +1295,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_karpenter @@ -1288,6 +1315,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - filter/cw_k8s_ci_v0_keda_drop_non_keda - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 @@ -1308,6 +1336,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_kube_state_metrics diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_gke.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_gke.yaml index 22ed10b38d3..cc591830f5c 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_gke.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_cluster_config_gke.yaml @@ -780,6 +780,14 @@ processors: - context: datapoint statements: - set(resource.attributes["k8s.apiserver.version"], attributes["git_version"]) where attributes["git_version"] != nil and attributes["git_version"] != "" + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ksm_clean_resource: error_mode: ignore metric_statements: @@ -827,6 +835,21 @@ processors: - set(attributes["cronjob"], resource.attributes["cronjob"]) where resource.attributes["cronjob"] != nil - set(attributes["owner_name"], resource.attributes["owner_name"]) where resource.attributes["owner_name"] != nil - set(attributes["owner_kind"], resource.attributes["owner_kind"]) where resource.attributes["owner_kind"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil + - delete_key(attributes, "uid") where attributes["uid"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "owner_name") where attributes["owner_name"] != nil + - delete_key(attributes, "owner_kind") where attributes["owner_kind"] != nil + - delete_key(attributes, "deployment") where attributes["deployment"] != nil + - delete_key(attributes, "daemonset") where attributes["daemonset"] != nil + - delete_key(attributes, "statefulset") where attributes["statefulset"] != nil + - delete_key(attributes, "replicaset") where attributes["replicaset"] != nil + - delete_key(attributes, "job_name") where attributes["job_name"] != nil + - delete_key(attributes, "cronjob") where attributes["cronjob"] != nil transform/cw_k8s_ci_v0_mark_cluster: error_mode: ignore metric_statements: @@ -948,14 +971,16 @@ processors: - set(attributes["k8s.pod.name"], attributes["pod"]) where attributes["pod"] != nil - set(attributes["k8s.namespace.name"], attributes["namespace"]) where attributes["namespace"] != nil - set(attributes["k8s.node.name"], attributes["node"]) where attributes["node"] != nil - - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil - - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil - - delete_key(attributes, "url.scheme") where attributes["url.scheme"] != nil - context: datapoint statements: - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil - set(attributes["node"], resource.attributes["node"]) where resource.attributes["node"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil transform/identity: error_mode: ignore flatten_data: false @@ -1248,6 +1273,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_apiserver_extract_version @@ -1268,6 +1294,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_karpenter @@ -1287,6 +1314,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - filter/cw_k8s_ci_v0_keda_drop_non_keda - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 @@ -1307,6 +1335,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_kube_state_metrics diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_node_config.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_node_config.yaml index c0d5f70bbee..7810d0f0cb6 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_node_config.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/container_insights_node_config.yaml @@ -895,6 +895,11 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil + - context: resource + statements: + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil transform/cw_k8s_ci_v0_dcgm_promote: error_mode: ignore metric_statements: @@ -910,6 +915,19 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - delete_key(attributes, "Hostname") where attributes["Hostname"] != nil - delete_key(attributes, "pci_bus_id") where attributes["pci_bus_id"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ebs_csi_promote: error_mode: ignore metric_statements: @@ -1631,6 +1649,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1654,6 +1673,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1675,6 +1695,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1729,6 +1750,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1748,6 +1770,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name - filter/cw_k8s_ci_v0_neuron @@ -1773,6 +1796,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_aks.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_aks.yaml index 7967c4c8b9b..032b77f1ed7 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_aks.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_aks.yaml @@ -941,6 +941,11 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil + - context: resource + statements: + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil transform/cw_k8s_ci_v0_dcgm_promote: error_mode: ignore metric_statements: @@ -956,6 +961,19 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - delete_key(attributes, "Hostname") where attributes["Hostname"] != nil - delete_key(attributes, "pci_bus_id") where attributes["pci_bus_id"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ebs_csi_promote: error_mode: ignore metric_statements: @@ -1623,6 +1641,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1646,6 +1665,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1667,6 +1687,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1721,6 +1742,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1740,6 +1762,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name - filter/cw_k8s_ci_v0_neuron @@ -1765,6 +1788,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_gke.yaml b/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_gke.yaml index 6119bdff763..1d816e98835 100644 --- a/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_gke.yaml +++ b/translator/tocwconfig/sampleConfig/opentelemetry/default_otel_config_gke.yaml @@ -940,6 +940,11 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil + - context: resource + statements: + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil transform/cw_k8s_ci_v0_dcgm_promote: error_mode: ignore metric_statements: @@ -955,6 +960,19 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - delete_key(attributes, "Hostname") where attributes["Hostname"] != nil - delete_key(attributes, "pci_bus_id") where attributes["pci_bus_id"] != nil + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_ebs_csi_promote: error_mode: ignore metric_statements: @@ -1622,6 +1640,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1645,6 +1664,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1666,6 +1686,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1720,6 +1741,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name @@ -1739,6 +1761,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name - filter/cw_k8s_ci_v0_neuron @@ -1764,6 +1787,7 @@ service: - forward/opentelemetry processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/apiserver.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/apiserver.yaml index 53bc5162cf1..8464036c15f 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/apiserver.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/apiserver.yaml @@ -65,6 +65,16 @@ processors: - set(unit, "m") where IsMatch(name, ".*_meters(_total)?$") - set(unit, "1") where unit == "" and IsMatch(name, ".*_total$") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_apiserver_extract_version: error_mode: ignore metric_statements: @@ -154,6 +164,7 @@ service: - prometheus/cw_k8s_ci_v0_apiserver processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_apiserver_extract_version diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/cadvisor.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/cadvisor.yaml index cb45e020389..c1a8fcb68a8 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/cadvisor.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/cadvisor.yaml @@ -59,6 +59,16 @@ processors: - set(unit, "MHz") where name == "DCGM_FI_DEV_SM_CLOCK" - set(unit, "By") where IsMatch(name, "^neuroncore_memory_usage_.*") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -96,6 +106,13 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil + # Drop the resource-level raw copies; the datapoint block above already copied them + # down. Must run after it — statement groups execute in declaration order. + - context: resource + statements: + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil transform/cw_k8s_ci_v0_set_node_name: error_mode: ignore metric_statements: @@ -220,6 +237,7 @@ service: - prometheus/cw_k8s_ci_v0_cadvisor processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/dcgm.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/dcgm.yaml index 389fdc3c4ba..fd1a853f6e2 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/dcgm.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/dcgm.yaml @@ -57,6 +57,16 @@ processors: - set(unit, "MHz") where name == "DCGM_FI_DEV_SM_CLOCK" - set(unit, "By") where IsMatch(name, "^neuroncore_memory_usage_.*") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -83,6 +93,13 @@ processors: - set(attributes["container"], resource.attributes["container"]) where resource.attributes["container"] != nil - delete_key(attributes, "Hostname") where attributes["Hostname"] != nil - delete_key(attributes, "pci_bus_id") where attributes["pci_bus_id"] != nil + # Drop the resource-level raw copies; the datapoint block above already copied them + # down. Must run after it — statement groups execute in declaration order. + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil k8sattributes/cw_k8s_ci_v0_pod: auth_type: serviceAccount extract: @@ -207,6 +224,7 @@ service: - prometheus/cw_k8s_ci_v0_dcgm processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/ebs_csi.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/ebs_csi.yaml index 4a464a724cd..438b146d5a9 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/ebs_csi.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/ebs_csi.yaml @@ -69,6 +69,16 @@ processors: - set(unit, "MHz") where name == "DCGM_FI_DEV_SM_CLOCK" - set(unit, "By") where IsMatch(name, "^neuroncore_memory_usage_.*") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -178,6 +188,7 @@ service: - prometheus/cw_k8s_ci_v0_ebs_csi_node processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/karpenter.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/karpenter.yaml index fcc4804c69f..e23611a997d 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/karpenter.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/karpenter.yaml @@ -60,6 +60,16 @@ processors: - set(unit, "m") where IsMatch(name, ".*_meters(_total)?$") - set(unit, "1") where unit == "" and IsMatch(name, ".*_total$") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_scope_karpenter: error_mode: ignore metric_statements: @@ -89,14 +99,18 @@ processors: - set(attributes["k8s.pod.name"], attributes["pod"]) where attributes["pod"] != nil - set(attributes["k8s.namespace.name"], attributes["namespace"]) where attributes["namespace"] != nil - set(attributes["k8s.node.name"], attributes["node"]) where attributes["node"] != nil - - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil - - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil - - delete_key(attributes, "url.scheme") where attributes["url.scheme"] != nil - context: datapoint statements: - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil - set(attributes["node"], resource.attributes["node"]) where resource.attributes["node"] != nil + # Drop the resource-level raw copies; the datapoint block above already copied them + # down. Must run after it — statement groups execute in declaration order. + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil k8sattributes/cw_k8s_ci_v0_pod: auth_type: serviceAccount extract: @@ -185,6 +199,7 @@ service: - prometheus/cw_k8s_ci_v0_karpenter processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_karpenter diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/keda.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/keda.yaml index 3dfc977e35b..9315a7c10ef 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/keda.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/keda.yaml @@ -67,6 +67,16 @@ processors: - set(unit, "m") where IsMatch(name, ".*_meters(_total)?$") - set(unit, "1") where unit == "" and IsMatch(name, ".*_total$") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_scope_keda: error_mode: ignore metric_statements: @@ -96,14 +106,18 @@ processors: - set(attributes["k8s.pod.name"], attributes["pod"]) where attributes["pod"] != nil - set(attributes["k8s.namespace.name"], attributes["namespace"]) where attributes["namespace"] != nil - set(attributes["k8s.node.name"], attributes["node"]) where attributes["node"] != nil - - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil - - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil - - delete_key(attributes, "url.scheme") where attributes["url.scheme"] != nil - context: datapoint statements: - set(attributes["pod"], resource.attributes["pod"]) where resource.attributes["pod"] != nil - set(attributes["namespace"], resource.attributes["namespace"]) where resource.attributes["namespace"] != nil - set(attributes["node"], resource.attributes["node"]) where resource.attributes["node"] != nil + # Drop the resource-level raw copies; the datapoint block above already copied them + # down. Must run after it — statement groups execute in declaration order. + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil k8sattributes/cw_k8s_ci_v0_pod: auth_type: serviceAccount extract: @@ -192,6 +206,7 @@ service: - prometheus/cw_k8s_ci_v0_keda processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - filter/cw_k8s_ci_v0_keda_drop_non_keda - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/kube_state_metrics.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/kube_state_metrics.yaml index 91a6a28495a..6be02dea788 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/kube_state_metrics.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/kube_state_metrics.yaml @@ -47,6 +47,16 @@ processors: - set(unit, "m") where IsMatch(name, ".*_meters(_total)?$") - set(unit, "1") where unit == "" and IsMatch(name, ".*_total$") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_scope_kube_state_metrics: error_mode: ignore metric_statements: @@ -125,6 +135,23 @@ processors: - set(attributes["cronjob"], resource.attributes["cronjob"]) where resource.attributes["cronjob"] != nil - set(attributes["owner_name"], resource.attributes["owner_name"]) where resource.attributes["owner_name"] != nil - set(attributes["owner_kind"], resource.attributes["owner_kind"]) where resource.attributes["owner_kind"] != nil + # Drop the resource-level raw copies; the datapoint block above already copied them + # down. Must run after it — statement groups execute in declaration order. + - context: resource + statements: + - delete_key(attributes, "pod") where attributes["pod"] != nil + - delete_key(attributes, "namespace") where attributes["namespace"] != nil + - delete_key(attributes, "node") where attributes["node"] != nil + - delete_key(attributes, "uid") where attributes["uid"] != nil + - delete_key(attributes, "container") where attributes["container"] != nil + - delete_key(attributes, "owner_name") where attributes["owner_name"] != nil + - delete_key(attributes, "owner_kind") where attributes["owner_kind"] != nil + - delete_key(attributes, "deployment") where attributes["deployment"] != nil + - delete_key(attributes, "daemonset") where attributes["daemonset"] != nil + - delete_key(attributes, "statefulset") where attributes["statefulset"] != nil + - delete_key(attributes, "replicaset") where attributes["replicaset"] != nil + - delete_key(attributes, "job_name") where attributes["job_name"] != nil + - delete_key(attributes, "cronjob") where attributes["cronjob"] != nil k8sattributes/cw_k8s_ci_v0_pod: auth_type: serviceAccount extract: @@ -235,6 +262,7 @@ service: - prometheus/cw_k8s_ci_v0_kube_state_metrics processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_scope_kube_state_metrics diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/lis_csi.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/lis_csi.yaml index a718751efca..ca5aab0acc1 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/lis_csi.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/lis_csi.yaml @@ -69,6 +69,16 @@ processors: - set(unit, "MHz") where name == "DCGM_FI_DEV_SM_CLOCK" - set(unit, "By") where IsMatch(name, "^neuroncore_memory_usage_.*") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -178,6 +188,7 @@ service: - prometheus/cw_k8s_ci_v0_lis_csi_node processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/neuron.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/neuron.yaml index beeed7e846d..8653d43a9ba 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/neuron.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/neuron.yaml @@ -21,6 +21,16 @@ processors: metric: - IsMatch(name, "^(up|scrape_duration_seconds|scrape_samples_scraped|scrape_samples_post_metric_relabeling|scrape_series_added)$") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -236,6 +246,7 @@ service: - prometheus/cw_k8s_ci_v0_neuron processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name - filter/cw_k8s_ci_v0_neuron diff --git a/translator/translate/otel/pipeline/opentelemetry/containerinsights/node_exporter.yaml b/translator/translate/otel/pipeline/opentelemetry/containerinsights/node_exporter.yaml index d01e4535871..67f15f76eea 100644 --- a/translator/translate/otel/pipeline/opentelemetry/containerinsights/node_exporter.yaml +++ b/translator/translate/otel/pipeline/opentelemetry/containerinsights/node_exporter.yaml @@ -57,6 +57,16 @@ processors: - set(unit, "MHz") where name == "DCGM_FI_DEV_SM_CLOCK" - set(unit, "By") where IsMatch(name, "^neuroncore_memory_usage_.*") metricstarttime/cw_k8s_ci_v0: {} + # Drop receiver-injected deprecated semconv attributes; their current-spelling twins + # (server.address, server.port, url.scheme) stay. All copies must stay identical. + transform/cw_k8s_ci_v0_drop_deprecated_semconv: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "net.host.name") where attributes["net.host.name"] != nil + - delete_key(attributes, "net.host.port") where attributes["net.host.port"] != nil + - delete_key(attributes, "http.scheme") where attributes["http.scheme"] != nil transform/cw_k8s_ci_v0_set_cluster_name: error_mode: ignore metric_statements: @@ -158,6 +168,7 @@ service: - prometheus/cw_k8s_ci_v0_node_exporter processors: - filter/cw_k8s_ci_v0_scrape_metadata + - transform/cw_k8s_ci_v0_drop_deprecated_semconv - transform/cw_k8s_ci_v0_set_unit - metricstarttime/cw_k8s_ci_v0 - transform/cw_k8s_ci_v0_set_cluster_name