From 95d09e3d79fa942f0b93c9d99e3935f76ac97948 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Fri, 24 Jan 2025 14:42:29 -0800 Subject: [PATCH] Fix splunk.zc.method --- .../win_install_dotnet_auto_instrumentation.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/deployments/ansible/roles/collector/tasks/win_install_dotnet_auto_instrumentation.yml b/deployments/ansible/roles/collector/tasks/win_install_dotnet_auto_instrumentation.yml index 2e515daa32..f5fec1f425 100644 --- a/deployments/ansible/roles/collector/tasks/win_install_dotnet_auto_instrumentation.yml +++ b/deployments/ansible/roles/collector/tasks/win_install_dotnet_auto_instrumentation.yml @@ -13,11 +13,6 @@ register: latest_dotnet_release when: splunk_dotnet_auto_instrumentation_version == "latest" and not splunk_dotnet_auto_instrumentation_url -- name: Set splunk-otel-dotnet version - set_fact: - splunk_dotnet_version: "{{ latest_dotnet_release.json.tag_name }}" - when: splunk_dotnet_auto_instrumentation_version == "latest" and not splunk_dotnet_auto_instrumentation_url - - name: Set dotnet_download_url fact set_fact: dotnet_download_url: |- @@ -78,10 +73,7 @@ {%- set value = item.value | string | lower -%} {%- endif -%} {%- if item.key == "OTEL_RESOURCE_ATTRIBUTES" -%} - {%- set method = "" -%} - {%- if splunk_dotnet_version.stdout != "" -%} - {%- set method = "splunk.zc.method=splunk-otel-dotnet-" + (splunk_dotnet_version.stdout | trim) -%} - {%- endif -%} + {%- set method = "splunk.zc.method=splunk-ansible" -%} {%- set value = (method + "," + splunk_dotnet_auto_instrumentation_global_tags) | trim(",") -%} {%- endif -%} {{ (options_list | default([])) + [item.key + '=' + (value | string)] }} @@ -114,10 +106,7 @@ {%- set value = item.value | string | lower -%} {%- endif -%} {%- if item.key == "OTEL_RESOURCE_ATTRIBUTES" -%} - {%- set method = "" -%} - {%- if splunk_dotnet_version.stdout != "" -%} - {%- set method = "splunk.zc.method=splunk-otel-dotnet-" + (splunk_dotnet_version.stdout | trim) -%} - {%- endif -%} + {%- set method = "splunk.zc.method=splunk-ansible" -%} {%- set value = (method + "," + splunk_dotnet_auto_instrumentation_global_tags) | trim(",") -%} {%- endif -%} {{ value | string }}