Skip to content

Commit da7e71c

Browse files
feat(jp): add JP region handling to 15 recipes with EU-specific logic
Per Takuya Azuma's Slack thread reporting that the JP rollout in OIL missed recipe files with region-specific endpoint logic: https://newrelic.slack.com/archives/C0A3CUFQHGC/p1783495861297169 Two patterns of missing JP handling were audited across all recipes: 1) NerdGraph API URL selection (3 files, uses 'grep -i eu'): recipes/newrelic/apm/java/linux.yml recipes/newrelic/infrastructure/alerts/golden.yml (2 blocks) recipes/newrelic/infrastructure/cloud/aws-linux.yml Add a parallel 'grep -i jp' branch pointing at 'https://api.jp.newrelic.com' immediately after the EU branch. This finishes off the scope originally captured (but never delivered) in NR-560720's 'Recipe Files — Explicit EU Region Conditionals (3 files)' section. 2) OTLP endpoint selection (12 files, uses '= "EU"'): recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/{debian,rhel}.yml recipes/newrelic/infrastructure/nrdot/haproxy/{debian,rhel}.yml recipes/newrelic/infrastructure/nrdot/kafka/{debian,rhel}.yml recipes/newrelic/infrastructure/nrdot/nginx/{debian,rhel}.yml recipes/newrelic/infrastructure/nrdot/nginx-plus/{debian,rhel}.yml recipes/newrelic/infrastructure/nrdot/rabbitmq/{debian,rhel}.yml Add a parallel 'JP' elif branch pointing at 'https://otlp.jp.nr-data.net[:PORT]' between the existing 'staging' elif and the default 'else' branch. Matches the precedent set in #1386 (nrdot/ibm-mq) by Shashank Reddy on 2026-06-30. Endpoint URLs cross-checked against the internal JP endpoint mapping table: api.jp.newrelic.com — NerdGraph API otlp.jp.nr-data.net — OTLP (note: no '01' suffix, unlike EU) otlp.jp.nr-data.net:4317 — OTLP gRPC otlp.jp.nr-data.net:4318 — OTLP HTTP False positive noted (no change made): recipes/newrelic/ebpf/{awslinux, centos,ubuntu}.yml pass $NEW_RELIC_REGION through as an env var to the eBPF Helm chart, which handles region routing internally. Only a descriptive comment ('# region "US"/"EU".') hints at legacy scope; functionally these recipes already work for JP once the eBPF chart supports it.
1 parent c7e90db commit da7e71c

15 files changed

Lines changed: 36 additions & 1 deletion

File tree

recipes/newrelic/apm/java/linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,9 @@ install:
508508
if [ $(echo {{.NEW_RELIC_REGION}} | grep -i eu | wc -l) -gt 0 ]; then
509509
NEW_RELIC_API_URL=$(echo -n 'https://api.eu.newrelic.com')
510510
fi
511+
if [ $(echo {{.NEW_RELIC_REGION}} | grep -i jp | wc -l) -gt 0 ]; then
512+
NEW_RELIC_API_URL=$(echo -n 'https://api.jp.newrelic.com')
513+
fi
511514
sudo sed -i "s,DEFAULT_API_URL,$NEW_RELIC_API_URL,g" /etc/newrelic-java/dynamic-attach.sh
512515
513516
javaAgentVersion=$(nri-lsi-java -agentVersion | grep -Po '"agentVersion":.*"' | awk -F': ' '{print $2}' | tr -d '"')

recipes/newrelic/infrastructure/alerts/golden.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ preInstall:
3333
if [ $(echo $NEW_RELIC_REGION | grep -i eu | wc -l) -gt 0 ]; then
3434
NEW_RELIC_API_URL=$(echo -n 'https://api.eu.newrelic.com')
3535
fi
36-
36+
if [ $(echo $NEW_RELIC_REGION | grep -i jp | wc -l) -gt 0 ]; then
37+
NEW_RELIC_API_URL=$(echo -n 'https://api.jp.newrelic.com')
38+
fi
39+
3740
POLICY_RESULT=$(curl -sX POST $NEW_RELIC_API_URL'/graphql' \
3841
-H "Api-Key:$NEW_RELIC_API_KEY" \
3942
-L -H 'Content-Type: application/json' \
@@ -73,6 +76,9 @@ install:
7376
if [ $(echo {{.NEW_RELIC_REGION}} | grep -i eu | wc -l) -gt 0 ]; then
7477
NEW_RELIC_API_URL=$(echo -n 'https://api.eu.newrelic.com')
7578
fi
79+
if [ $(echo {{.NEW_RELIC_REGION}} | grep -i jp | wc -l) -gt 0 ]; then
80+
NEW_RELIC_API_URL=$(echo -n 'https://api.jp.newrelic.com')
81+
fi
7682
7783
echo 'Creating alert policy {{.ALERT_POLICY_NAME}}...'
7884

recipes/newrelic/infrastructure/cloud/aws-linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ install:
209209
NEW_RELIC_API_URL='https://staging-api.newrelic.com/graphql'
210210
elif [ $(echo {{.NEW_RELIC_REGION}} | grep -i eu | wc -l) -gt 0 ]; then
211211
NEW_RELIC_API_URL='https://api.eu.newrelic.com/graphql'
212+
elif [ $(echo {{.NEW_RELIC_REGION}} | grep -i jp | wc -l) -gt 0 ]; then
213+
NEW_RELIC_API_URL='https://api.jp.newrelic.com/graphql'
212214
fi
213215
214216
curlQuery=$(echo $query | curl $NEW_RELIC_API_URL \

recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ install:
162162
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net"
163163
elif [ "{{.NEW_RELIC_REGION}}" = "staging" ]; then
164164
OTLP_ENDPOINT="https://staging-otlp.nr-data.net"
165+
elif [ "{{.NEW_RELIC_REGION}}" = "JP" ]; then
166+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net"
165167
else
166168
OTLP_ENDPOINT="https://otlp.nr-data.net"
167169
fi

recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/rhel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ install:
172172
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net"
173173
elif [ "{{.NEW_RELIC_REGION}}" = "staging" ]; then
174174
OTLP_ENDPOINT="https://staging-otlp.nr-data.net"
175+
elif [ "{{.NEW_RELIC_REGION}}" = "JP" ]; then
176+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net"
175177
else
176178
OTLP_ENDPOINT="https://otlp.nr-data.net"
177179
fi

recipes/newrelic/infrastructure/nrdot/haproxy/debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ install:
179179
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net"
180180
elif [ "${NEW_RELIC_REGION}" = "staging" ]; then
181181
OTLP_ENDPOINT="https://staging-otlp.nr-data.net"
182+
elif [ "${NEW_RELIC_REGION}" = "JP" ]; then
183+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net"
182184
else
183185
OTLP_ENDPOINT="https://otlp.nr-data.net"
184186
fi

recipes/newrelic/infrastructure/nrdot/haproxy/rhel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ install:
184184
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net"
185185
elif [ "${NEW_RELIC_REGION}" = "staging" ]; then
186186
OTLP_ENDPOINT="https://staging-otlp.nr-data.net"
187+
elif [ "${NEW_RELIC_REGION}" = "JP" ]; then
188+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net"
187189
else
188190
OTLP_ENDPOINT="https://otlp.nr-data.net"
189191
fi

recipes/newrelic/infrastructure/nrdot/kafka/debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ install:
115115
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net:4317"
116116
elif [ "{{.NEW_RELIC_REGION}}" = "staging" ]; then
117117
OTLP_ENDPOINT="https://staging-otlp.nr-data.net:4317"
118+
elif [ "{{.NEW_RELIC_REGION}}" = "JP" ]; then
119+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net:4317"
118120
else
119121
OTLP_ENDPOINT="https://otlp.nr-data.net:4317"
120122
fi

recipes/newrelic/infrastructure/nrdot/kafka/rhel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ install:
121121
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net:4317"
122122
elif [ "{{.NEW_RELIC_REGION}}" = "staging" ]; then
123123
OTLP_ENDPOINT="https://staging-otlp.nr-data.net:4317"
124+
elif [ "{{.NEW_RELIC_REGION}}" = "JP" ]; then
125+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net:4317"
124126
else
125127
OTLP_ENDPOINT="https://otlp.nr-data.net:4317"
126128
fi

recipes/newrelic/infrastructure/nrdot/nginx-plus/debian.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ install:
218218
OTLP_ENDPOINT="https://otlp.eu01.nr-data.net"
219219
elif [ "${NEW_RELIC_REGION}" = "staging" ]; then
220220
OTLP_ENDPOINT="https://staging-otlp.nr-data.net"
221+
elif [ "${NEW_RELIC_REGION}" = "JP" ]; then
222+
OTLP_ENDPOINT="https://otlp.jp.nr-data.net"
221223
else
222224
OTLP_ENDPOINT="https://otlp.nr-data.net"
223225
fi

0 commit comments

Comments
 (0)