Skip to content

Commit

Permalink
Fix splunk.zc.method
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanotti committed Jan 24, 2025
1 parent ff6a39b commit 95d09e3
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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)] }}
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 95d09e3

Please sign in to comment.