diff --git a/.github/workflows/chef-test.yml b/.github/workflows/chef-test.yml index 71173df947..a096a495e7 100644 --- a/.github/workflows/chef-test.yml +++ b/.github/workflows/chef-test.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - chef-java-v2 paths: - '.github/workflows/chef-test.yml' - 'deployments/chef/**' diff --git a/deployments/chef/CHANGELOG.md b/deployments/chef/CHANGELOG.md index 7e08c3f37c..80588e3d9c 100644 --- a/deployments/chef/CHANGELOG.md +++ b/deployments/chef/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## chef-v0.15.0 + +- Breaking Change: The default for the `auto_instrumentation_otlp_endpoint` option has been changed from + `http://127.0.0.1:4317` to `''` (empty), i.e. defer to the default `OTEL_EXPORTER_OTLP_ENDPOINT` value for each + activated SDK. +- Add support for the `auto_instrumentation_otlp_endpoint_protocol` and `auto_instrumentation_metrics_exporter` options + to configure the `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_METRICS_EXPORTER` environment variables, respectively. + ## chef-v0.14.0 - Initial support for [Splunk OpenTelemetry for .NET](https://github.com/signalfx/splunk-otel-dotnet) Auto diff --git a/deployments/chef/README.md b/deployments/chef/README.md index 7ef9480e8c..438702f179 100644 --- a/deployments/chef/README.md +++ b/deployments/chef/README.md @@ -271,9 +271,27 @@ after installation/configuration in order for any change to take effect. - `auto_instrumentation_enable_metrics` (Linux only): Enable or disable exporting instrumentation metrics. (**default**: `false`) -- `auto_instrumentation_otlp_endpoint` (Linux only): Set the OTLP gRPC endpoint - for captured traces. Only applicable if `auto_instrumentation_version` is - `latest` or >= `0.87.0`. (**default:** `http://127.0.0.1:4317`) +- `auto_instrumentation_otlp_endpoint` (Linux only): Set the OTLP endpoint for + captured traces. The value will be set to the `OTEL_EXPORTER_OTLP_ENDPOINT` + environment variable. Only applicable if `auto_instrumentation_version` is + `latest` or >= `0.87.0`. (**default:** `''`, i.e. defer to the default + `OTEL_EXPORTER_OTLP_ENDPOINT` value for each activated SDK) + +- `auto_instrumentation_otlp_endpoint_protocol` (Linux only): Set the protocol + for `auto_instrumentation_otlp_endpoint`, for example `grpc` or + `http/protobuf`. The value will be set to the `OTEL_EXPORTER_OTLP_PROTOCOL` + environment variable. Only applicable if `auto_instrumentation_version` is + `latest` or >= `0.104.0` and `auto_instrumentation_otlp_endpoint` is + non-empty. (**default:** `''`, i.e. defer to the default + `OTEL_EXPORTER_OTLP_PROTOCOL` value for each activated SDK) + +- `auto_instrumentation_metrics_exporter` (Linux only): Comma-separated list of + exporters for collected metrics by all activated SDKs, for example + `otlp,prometheus`. Set the value to `none` to disable collection and export + of metrics. The value will be set to the `OTEL_METRICS_EXPORTER` environment + variable. Only applicable if `auto_instrumentation_version` is `latest` or >= + `0.104.0`. (**default:** `''`, i.e. defer to the default + `OTEL_METRICS_EXPORTER` value for each activated SDK) ### Auto Instrumentation for .NET on Windows diff --git a/deployments/chef/attributes/default.rb b/deployments/chef/attributes/default.rb index 2969b67630..9fb7342487 100644 --- a/deployments/chef/attributes/default.rb +++ b/deployments/chef/attributes/default.rb @@ -99,7 +99,9 @@ default['splunk_otel_collector']['auto_instrumentation_enable_profiler'] = false default['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'] = false default['splunk_otel_collector']['auto_instrumentation_enable_metrics'] = false - default['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] = 'http://127.0.0.1:4317' + default['splunk_otel_collector']['auto_instrumentation_metrics_exporter'] = '' + default['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] = '' + default['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] = '' default['splunk_otel_collector']['with_auto_instrumentation_sdks'] = %w(java nodejs dotnet) default['splunk_otel_collector']['auto_instrumentation_npm_path'] = 'npm' end diff --git a/deployments/chef/kitchen.yml b/deployments/chef/kitchen.yml index e2f444fd58..eefbea2384 100644 --- a/deployments/chef/kitchen.yml +++ b/deployments/chef/kitchen.yml @@ -175,6 +175,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_systemd_instrumentation run_list: @@ -208,6 +210,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_preload_java_instrumentation run_list: @@ -237,6 +241,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_systemd_java_instrumentation run_list: @@ -267,6 +273,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_preload_node_instrumentation run_list: @@ -302,6 +310,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_systemd_node_instrumentation run_list: @@ -338,6 +348,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_preload_dotnet_instrumentation run_list: @@ -367,6 +379,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_systemd_dotnet_instrumentation run_list: @@ -397,6 +411,8 @@ suites: auto_instrumentation_enable_profiler_memory: true auto_instrumentation_enable_metrics: true auto_instrumentation_otlp_endpoint: http://0.0.0.0:4317 + auto_instrumentation_otlp_endpoint_protocol: grpc + auto_instrumentation_otlp_metrics_exporter: none - name: with_default_preload_instrumentation_without_npm run_list: diff --git a/deployments/chef/metadata.rb b/deployments/chef/metadata.rb index b809dd4421..6dc44d05c0 100644 --- a/deployments/chef/metadata.rb +++ b/deployments/chef/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'signalfx-support@splunk.com' license 'Apache-2.0' description 'Install/Configure the Splunk OpenTelemetry Collector' -version '0.14.0' +version '0.15.0' chef_version '>= 16.0' supports 'amazon' diff --git a/deployments/chef/templates/00-splunk-otel-auto-instrumentation.conf.erb b/deployments/chef/templates/00-splunk-otel-auto-instrumentation.conf.erb index a9b6b18cb6..92719b0438 100644 --- a/deployments/chef/templates/00-splunk-otel-auto-instrumentation.conf.erb +++ b/deployments/chef/templates/00-splunk-otel-auto-instrumentation.conf.erb @@ -26,4 +26,12 @@ DefaultEnvironment="OTEL_SERVICE_NAME=<%= node['splunk_otel_collector']['auto_in DefaultEnvironment="SPLUNK_PROFILER_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler'].to_s.downcase %>" DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'].to_s.downcase %>" DefaultEnvironment="SPLUNK_METRICS_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_metrics'].to_s.downcase %>" +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] != "" -%> DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] %>" +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] != "" -%> +DefaultEnvironment="OTEL_EXPORTER_OTLP_PROTOCOL=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] %>" +<% end -%> +<% end -%> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_metrics_exporter']) && node['splunk_otel_collector']['auto_instrumentation_metrics_exporter'] != "" -%> +DefaultEnvironment="OTEL_METRICS_EXPORTER=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_metrics_exporter'] %>" +<% end -%> diff --git a/deployments/chef/templates/dotnet.conf.erb b/deployments/chef/templates/dotnet.conf.erb index 8a2b65e612..e319217179 100644 --- a/deployments/chef/templates/dotnet.conf.erb +++ b/deployments/chef/templates/dotnet.conf.erb @@ -17,4 +17,12 @@ OTEL_SERVICE_NAME=<%= node['splunk_otel_collector']['auto_instrumentation_servic SPLUNK_PROFILER_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler'].to_s.downcase %> SPLUNK_PROFILER_MEMORY_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'].to_s.downcase %> SPLUNK_METRICS_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_metrics'].to_s.downcase %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] != "" -%> OTEL_EXPORTER_OTLP_ENDPOINT=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] != "" -%> +OTEL_EXPORTER_OTLP_PROTOCOL=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] %> +<% end -%> +<% end -%> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_metrics_exporter']) && node['splunk_otel_collector']['auto_instrumentation_metrics_exporter'] != "" -%> +OTEL_METRICS_EXPORTER=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_metrics_exporter'] %> +<% end -%> diff --git a/deployments/chef/templates/java.conf.erb b/deployments/chef/templates/java.conf.erb index 8f468bd585..08ead05f8b 100644 --- a/deployments/chef/templates/java.conf.erb +++ b/deployments/chef/templates/java.conf.erb @@ -10,4 +10,12 @@ OTEL_SERVICE_NAME=<%= node['splunk_otel_collector']['auto_instrumentation_servic SPLUNK_PROFILER_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler'].to_s.downcase %> SPLUNK_PROFILER_MEMORY_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'].to_s.downcase %> SPLUNK_METRICS_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_metrics'].to_s.downcase %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] != "" -%> OTEL_EXPORTER_OTLP_ENDPOINT=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] != "" -%> +OTEL_EXPORTER_OTLP_PROTOCOL=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] %> +<% end -%> +<% end -%> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_metrics_exporter']) && node['splunk_otel_collector']['auto_instrumentation_metrics_exporter'] != "" -%> +OTEL_METRICS_EXPORTER=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_metrics_exporter'] %> +<% end -%> diff --git a/deployments/chef/templates/node.conf.erb b/deployments/chef/templates/node.conf.erb index d103d770a5..49c968e34d 100644 --- a/deployments/chef/templates/node.conf.erb +++ b/deployments/chef/templates/node.conf.erb @@ -10,4 +10,12 @@ OTEL_SERVICE_NAME=<%= node['splunk_otel_collector']['auto_instrumentation_servic SPLUNK_PROFILER_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler'].to_s.downcase %> SPLUNK_PROFILER_MEMORY_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'].to_s.downcase %> SPLUNK_METRICS_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_metrics'].to_s.downcase %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] != "" -%> OTEL_EXPORTER_OTLP_ENDPOINT=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] %> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol']) && node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] != "" -%> +OTEL_EXPORTER_OTLP_PROTOCOL=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_protocol'] %> +<% end -%> +<% end -%> +<% if defined?(node['splunk_otel_collector']['auto_instrumentation_metrics_exporter']) && node['splunk_otel_collector']['auto_instrumentation_metrics_exporter'] != "" -%> +OTEL_METRICS_EXPORTER=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint_metrics_exporter'] %> +<% end -%> diff --git a/deployments/chef/test/integration/with_custom_preload_dotnet_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_preload_dotnet_instrumentation/test.rb index 9899a0a7bb..0cebae3494 100644 --- a/deployments/chef/test/integration/with_custom_preload_dotnet_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_preload_dotnet_instrumentation/test.rb @@ -48,6 +48,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_preload_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_preload_instrumentation/test.rb index 21728349bc..e830b624d0 100644 --- a/deployments/chef/test/integration/with_custom_preload_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_preload_instrumentation/test.rb @@ -35,6 +35,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe file('/etc/splunk/zeroconfig/node.conf') do @@ -45,6 +47,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe file('/etc/splunk/zeroconfig/dotnet.conf') do @@ -62,6 +66,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_preload_java_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_preload_java_instrumentation/test.rb index a8fb663d22..e486fc5654 100644 --- a/deployments/chef/test/integration/with_custom_preload_java_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_preload_java_instrumentation/test.rb @@ -41,6 +41,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_preload_node_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_preload_node_instrumentation/test.rb index 580d09af56..266cc18714 100644 --- a/deployments/chef/test/integration/with_custom_preload_node_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_preload_node_instrumentation/test.rb @@ -41,6 +41,8 @@ its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should match /^OTEL_EXPORTER_OTLP_PROTOCOL=grpc$/ } + its('content') { should match /^OTEL_METRICS_EXPORTER=none$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_systemd_dotnet_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_systemd_dotnet_instrumentation/test.rb index 1baf60f4b1..5cd39951e9 100644 --- a/deployments/chef/test/integration/with_custom_systemd_dotnet_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_systemd_dotnet_instrumentation/test.rb @@ -48,6 +48,8 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_PROTOCOL=grpc"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_METRICS_EXPORTER=none"$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_systemd_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_systemd_instrumentation/test.rb index 3135f3dc5e..f8209e9542 100644 --- a/deployments/chef/test/integration/with_custom_systemd_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_systemd_instrumentation/test.rb @@ -50,6 +50,8 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_PROTOCOL=grpc"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_METRICS_EXPORTER=none"$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_systemd_java_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_systemd_java_instrumentation/test.rb index 923d9c8294..8908e6f153 100644 --- a/deployments/chef/test/integration/with_custom_systemd_java_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_systemd_java_instrumentation/test.rb @@ -48,6 +48,8 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_PROTOCOL=grpc"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_METRICS_EXPORTER=none"$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_custom_systemd_node_instrumentation/test.rb b/deployments/chef/test/integration/with_custom_systemd_node_instrumentation/test.rb index 94eecb15d8..cfd78fafb9 100644 --- a/deployments/chef/test/integration/with_custom_systemd_node_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_custom_systemd_node_instrumentation/test.rb @@ -48,6 +48,8 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=true"$/ } its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_PROTOCOL=grpc"$/ } + its('content') { should match /^DefaultEnvironment="OTEL_METRICS_EXPORTER=none"$/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_preload_dotnet_instrumentation/test.rb b/deployments/chef/test/integration/with_default_preload_dotnet_instrumentation/test.rb index a15b62b79f..f682bbf25c 100644 --- a/deployments/chef/test/integration/with_default_preload_dotnet_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_preload_dotnet_instrumentation/test.rb @@ -1,6 +1,5 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -45,7 +44,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_preload_instrumentation/test.rb b/deployments/chef/test/integration/with_default_preload_instrumentation/test.rb index a402f218f5..a8cee106c6 100644 --- a/deployments/chef/test/integration/with_default_preload_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_preload_instrumentation/test.rb @@ -2,7 +2,6 @@ java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' node_options = '-r /usr/lib/splunk-instrumentation/splunk-otel-js/node_modules/@splunk/otel/instrument' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -32,7 +31,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe file('/etc/splunk/zeroconfig/node.conf') do @@ -42,7 +43,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe file('/etc/splunk/zeroconfig/dotnet.conf') do @@ -59,7 +62,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_preload_instrumentation_without_npm/test.rb b/deployments/chef/test/integration/with_default_preload_instrumentation_without_npm/test.rb index 8e908e7d97..42b41ed71c 100644 --- a/deployments/chef/test/integration/with_default_preload_instrumentation_without_npm/test.rb +++ b/deployments/chef/test/integration/with_default_preload_instrumentation_without_npm/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -35,7 +34,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe file('/etc/splunk/zeroconfig/dotnet.conf') do @@ -52,7 +53,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_preload_java_instrumentation/test.rb b/deployments/chef/test/integration/with_default_preload_java_instrumentation/test.rb index 51944b6324..b09441bcb8 100644 --- a/deployments/chef/test/integration/with_default_preload_java_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_preload_java_instrumentation/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+' -otlp_endpoint = 'http://127.0.0.1:4317' describe package('splunk-otel-auto-instrumentation') do it { should be_installed } @@ -38,7 +37,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_preload_node_instrumentation/test.rb b/deployments/chef/test/integration/with_default_preload_node_instrumentation/test.rb index 9a542491f4..b4f2f65819 100644 --- a/deployments/chef/test/integration/with_default_preload_node_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_preload_node_instrumentation/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' node_options = '-r /usr/lib/splunk-instrumentation/splunk-otel-js/node_modules/@splunk/otel/instrument' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+' -otlp_endpoint = 'http://127.0.0.1:4317' describe package('splunk-otel-auto-instrumentation') do it { should be_installed } @@ -38,7 +37,9 @@ its('content') { should match /^SPLUNK_PROFILER_ENABLED=false$/ } its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=false$/ } its('content') { should match /^SPLUNK_METRICS_ENABLED=false$/ } - its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_systemd_dotnet_instrumentation/test.rb b/deployments/chef/test/integration/with_default_systemd_dotnet_instrumentation/test.rb index 364558abf6..c36cf0fade 100644 --- a/deployments/chef/test/integration/with_default_systemd_dotnet_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_systemd_dotnet_instrumentation/test.rb @@ -1,6 +1,5 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+-systemd' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -47,7 +46,9 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=false"$/ } - its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_systemd_instrumentation/test.rb b/deployments/chef/test/integration/with_default_systemd_instrumentation/test.rb index 8178046c33..fc30d5bbee 100644 --- a/deployments/chef/test/integration/with_default_systemd_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_systemd_instrumentation/test.rb @@ -2,7 +2,6 @@ java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' node_options = '-r /usr/lib/splunk-instrumentation/splunk-otel-js/node_modules/@splunk/otel/instrument' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+-systemd' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -49,7 +48,9 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=false"$/ } - its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_systemd_instrumentation_without_npm/test.rb b/deployments/chef/test/integration/with_default_systemd_instrumentation_without_npm/test.rb index dd3635f27d..876c2c67e4 100644 --- a/deployments/chef/test/integration/with_default_systemd_instrumentation_without_npm/test.rb +++ b/deployments/chef/test/integration/with_default_systemd_instrumentation_without_npm/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+-systemd' -otlp_endpoint = 'http://127.0.0.1:4317' dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' describe package('splunk-otel-auto-instrumentation') do @@ -48,7 +47,9 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=false"$/ } - its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_systemd_java_instrumentation/test.rb b/deployments/chef/test/integration/with_default_systemd_java_instrumentation/test.rb index c59b1010ea..8896f0fb9e 100644 --- a/deployments/chef/test/integration/with_default_systemd_java_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_systemd_java_instrumentation/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' java_tool_options = '-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+-systemd' -otlp_endpoint = 'http://127.0.0.1:4317' describe package('splunk-otel-auto-instrumentation') do it { should be_installed } @@ -47,7 +46,9 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=false"$/ } - its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do diff --git a/deployments/chef/test/integration/with_default_systemd_node_instrumentation/test.rb b/deployments/chef/test/integration/with_default_systemd_node_instrumentation/test.rb index dddbb19a4d..f5c5745704 100644 --- a/deployments/chef/test/integration/with_default_systemd_node_instrumentation/test.rb +++ b/deployments/chef/test/integration/with_default_systemd_node_instrumentation/test.rb @@ -1,7 +1,6 @@ libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' node_options = '-r /usr/lib/splunk-instrumentation/splunk-otel-js/node_modules/@splunk/otel/instrument' resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+-systemd' -otlp_endpoint = 'http://127.0.0.1:4317' describe package('splunk-otel-auto-instrumentation') do it { should be_installed } @@ -47,7 +46,9 @@ its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_PROFILER_MEMORY_ENABLED=false"$/ } its('content') { should match /^DefaultEnvironment="SPLUNK_METRICS_ENABLED=false"$/ } - its('content') { should match /^DefaultEnvironment="OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}"$/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_ENDPOINT.*/ } + its('content') { should_not match /.*OTEL_EXPORTER_OTLP_PROTOCOL.*/ } + its('content') { should_not match /.*OTEL_METRICS_EXPORTER.*/ } end describe service('splunk-otel-collector') do