From 307c9da171f12270a6273c78aa43708514ae8a33 Mon Sep 17 00:00:00 2001 From: Aravind Metku Date: Wed, 6 May 2026 15:25:09 +0530 Subject: [PATCH] feat: add JP region support --- .../java/com/newrelic/videoagent/core/NRVideoConfiguration.java | 2 ++ .../java/com/newrelic/videoagent/core/auth/TokenManager.java | 2 ++ .../newrelic/videoagent/core/harvest/OptimizedHttpClient.java | 1 + 3 files changed, 5 insertions(+) diff --git a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/NRVideoConfiguration.java b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/NRVideoConfiguration.java index 21206cc..ff19687 100644 --- a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/NRVideoConfiguration.java +++ b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/NRVideoConfiguration.java @@ -32,6 +32,8 @@ public final class NRVideoConfiguration { regions.put("STAGING", "STAGING"); regions.put("DEV", "STAGING"); regions.put("TEST", "STAGING"); + regions.put("JP", "JP"); + regions.put("JAPAN", "JP"); REGION_MAPPINGS = regions; // Immutable reference } diff --git a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/auth/TokenManager.java b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/auth/TokenManager.java index b1ecda1..0980e87 100644 --- a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/auth/TokenManager.java +++ b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/auth/TokenManager.java @@ -173,6 +173,8 @@ private String buildTokenEndpoint() { return "https://mobile-collector.ap.newrelic.com/mobile/v5/connect"; case "GOV": return "https://mobile-collector.gov.newrelic.com/mobile/v5/connect"; + case "JP": + return "https://mobile-collector.jp.nr-data.net/mobile/v5/connect"; default: return "https://mobile-collector.newrelic.com/mobile/v5/connect"; } diff --git a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/harvest/OptimizedHttpClient.java b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/harvest/OptimizedHttpClient.java index 2662275..686d9ff 100644 --- a/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/harvest/OptimizedHttpClient.java +++ b/NewRelicVideoCore/src/main/java/com/newrelic/videoagent/core/harvest/OptimizedHttpClient.java @@ -44,6 +44,7 @@ public class OptimizedHttpClient implements HttpClientInterface { REGIONAL_ENDPOINTS.put("EU", "https://mobile-collector.eu.newrelic.com/mobile/v3/data"); REGIONAL_ENDPOINTS.put("AP", "https://mobile-collector.ap.newrelic.com/mobile/v3/data"); REGIONAL_ENDPOINTS.put("GOV", "https://mobile-collector.gov.newrelic.com/mobile/v3/data"); + REGIONAL_ENDPOINTS.put("JP", "https://mobile-collector.jp.nr-data.net/mobile/v3/data"); REGIONAL_ENDPOINTS.put("DEFAULT", REGIONAL_ENDPOINTS.get("US")); }