Skip to content

Commit e2c2179

Browse files
authored
use dig instead of .& check
1 parent 23625a3 commit e2c2179

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deployments/chef/templates/splunk-otel-collector.conf.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
SPLUNK_CONFIG=<%= node['splunk_otel_collector']['collector_config_dest'] %>
33

44
# Access token to authenticate requests.
5-
SPLUNK_ACCESS_TOKEN=<%= node.run_state['splunk_otel_collector']&.[]('splunk_access_token') || node['splunk_otel_collector']['splunk_access_token'] %>
5+
SPLUNK_ACCESS_TOKEN=<%= node.run_state.dig('splunk_otel_collector', 'splunk_access_token') || node['splunk_otel_collector']['splunk_access_token'] %>
66

77
# Which realm to send the data to.
88
SPLUNK_REALM=<%= node['splunk_otel_collector']['splunk_realm'] %>
@@ -17,7 +17,7 @@ SPLUNK_INGEST_URL=<%= node['splunk_otel_collector']['splunk_ingest_url'] %>
1717
SPLUNK_HEC_URL=<%= node['splunk_otel_collector']['splunk_hec_url'] %>
1818

1919
# Splunk HEC token.
20-
SPLUNK_HEC_TOKEN=<%= node.run_state['splunk_otel_collector']&.[]('splunk_hec_token') || node['splunk_otel_collector']['splunk_hec_token'] %>
20+
SPLUNK_HEC_TOKEN=<%= node.run_state.dig('splunk_otel_collector', 'splunk_hec_token') || node['splunk_otel_collector']['splunk_hec_token'] %>
2121

2222
# Total memory in MIB to allocate to the collector.
2323
# Automatically configures the memory limit.

0 commit comments

Comments
 (0)