Skip to content

Commit a0f99cd

Browse files
authored
feat(tags): Define custom attributes for macos (#1074)
1 parent 4eaad4b commit a0f99cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

recipes/newrelic/infrastructure/darwin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ install:
135135
sed -i.bak "/^status_server_port/d" "{{.V2_CONFIG_FILE}}" && rm "{{.V2_CONFIG_FILE}}".bak
136136
sed -i.bak "/^license_key/d" "{{.V2_CONFIG_FILE}}" && rm "{{.V2_CONFIG_FILE}}".bak
137137
sed -i.bak "/^metrics_process_sample_rate/d" "{{.V2_CONFIG_FILE}}" && rm "{{.V2_CONFIG_FILE}}".bak
138+
sed -i.bak '/^custom_attributes:/,/^\S/{ /^\S/!d }' "{{.V2_CONFIG_FILE}}" && rm "{{.V2_CONFIG_FILE}}.bak"
139+
sed -i.bak '/^custom_attributes:/d' "{{.V2_CONFIG_FILE}}" && rm "{{.V2_CONFIG_FILE}}.bak"
138140
else
139141
mkdir -p "{{.V2_CONFIG_FILE_DIR}}"
140142
touch "{{.V2_CONFIG_FILE}}"
@@ -147,6 +149,7 @@ install:
147149
echo 'status_server_enabled: true' >> "{{.V2_CONFIG_FILE}}"
148150
echo 'status_server_port: 18003' >> "{{.V2_CONFIG_FILE}}"
149151
echo 'license_key: {{.NEW_RELIC_LICENSE_KEY}}' >> "{{.V2_CONFIG_FILE}}"
152+
echo '{{.NRIA_CUSTOM_ATTRIBUTES}}' >> "{{.V2_CONFIG_FILE}}"
150153
151154
setup_proxy:
152155
cmds:

0 commit comments

Comments
 (0)