Skip to content

Commit

Permalink
chef: support splunk-otel-java v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk committed Jul 25, 2024
1 parent ce4a481 commit 4c8a339
Show file tree
Hide file tree
Showing 28 changed files with 141 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/chef-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- chef-java-v2
paths:
- '.github/workflows/chef-test.yml'
- 'deployments/chef/**'
Expand Down
8 changes: 8 additions & 0 deletions deployments/chef/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 21 additions & 3 deletions deployments/chef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion deployments/chef/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions deployments/chef/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion deployments/chef/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email '[email protected]'
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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
8 changes: 8 additions & 0 deletions deployments/chef/templates/dotnet.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
8 changes: 8 additions & 0 deletions deployments/chef/templates/java.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
8 changes: 8 additions & 0 deletions deployments/chef/templates/node.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 4c8a339

Please sign in to comment.