From 80082a58c02b7005769c66d396dcabd2b697975e Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Mon, 2 Nov 2020 13:27:29 +0100 Subject: [PATCH] Reduce set of data centers and add some ip addresses --- cart/server.js | 12 ++++-------- catalogue/server.js | 12 ++++-------- dispatch/main.go | 10 +++------- load-gen/robot-shop.py | 9 ++++++++- .../src/EventListener/InstanaDataCenterListener.php | 12 ++++-------- .../shipping/ShippingServiceApplication.java | 12 ++++-------- user/server.js | 12 ++++-------- 7 files changed, 31 insertions(+), 48 deletions(-) diff --git a/cart/server.js b/cart/server.js index eb58c53..9140821 100644 --- a/cart/server.js +++ b/cart/server.js @@ -50,15 +50,11 @@ app.use((req, res, next) => { app.use((req, res, next) => { let dcs = [ + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", - "us-west1", - "us-west2", - "eu-west3", - "eu-west4" + "us-west1" ]; let span = instana.currentSpan(); span.annotate('custom.sdk.tags.datacenter', dcs[Math.floor(Math.random() * dcs.length)]); diff --git a/catalogue/server.js b/catalogue/server.js index 9049bfe..0b31d13 100644 --- a/catalogue/server.js +++ b/catalogue/server.js @@ -40,15 +40,11 @@ app.use((req, res, next) => { app.use((req, res, next) => { let dcs = [ + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", - "us-west1", - "us-west2", - "eu-west3", - "eu-west4" + "us-west1" ]; let span = instana.currentSpan(); span.annotate('custom.sdk.tags.datacenter', dcs[Math.floor(Math.random() * dcs.length)]); diff --git a/dispatch/main.go b/dispatch/main.go index 255ac24..2b0abd9 100644 --- a/dispatch/main.go +++ b/dispatch/main.go @@ -28,15 +28,11 @@ var ( errorPercent int dataCenters = []string{ + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", "us-west1", - "us-west2", - "eu-west3", - "eu-west4", } ) diff --git a/load-gen/robot-shop.py b/load-gen/robot-shop.py index e089083..d08cb46 100644 --- a/load-gen/robot-shop.py +++ b/load-gen/robot-shop.py @@ -8,6 +8,7 @@ from random import randint class UserBehavior(HttpUser): wait_time = between(2, 10) + # source: https://tools.tracemyip.org/search--ip/list fake_ip_addresses = [ # white house "156.33.241.5", @@ -16,7 +17,13 @@ class UserBehavior(HttpUser): # Chicago "98.142.103.241", # Los Angeles - "192.241.230.151" + "192.241.230.151", + # Berlin + "46.114.35.116", + # Singapore + "52.77.99.130", + # Sydney + "60.242.161.215" ] def on_start(self): diff --git a/ratings/html/src/EventListener/InstanaDataCenterListener.php b/ratings/html/src/EventListener/InstanaDataCenterListener.php index 235247b..f416219 100644 --- a/ratings/html/src/EventListener/InstanaDataCenterListener.php +++ b/ratings/html/src/EventListener/InstanaDataCenterListener.php @@ -9,15 +9,11 @@ use Psr\Log\LoggerInterface; class InstanaDataCenterListener { private static $dataCenters = [ + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", - "us-west1", - "us-west2", - "eu-west3", - "eu-west4" + "us-west1" ]; /** diff --git a/shipping/src/main/java/com/instana/robotshop/shipping/ShippingServiceApplication.java b/shipping/src/main/java/com/instana/robotshop/shipping/ShippingServiceApplication.java index 1aec167..b500cb1 100644 --- a/shipping/src/main/java/com/instana/robotshop/shipping/ShippingServiceApplication.java +++ b/shipping/src/main/java/com/instana/robotshop/shipping/ShippingServiceApplication.java @@ -27,15 +27,11 @@ import java.util.Random; public class ShippingServiceApplication implements WebMvcConfigurer { private static final String[] DATA_CENTERS = { + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", - "us-west1", - "us-west2", - "eu-west3", - "eu-west4" + "us-west1" }; public static void main(String[] args) { diff --git a/user/server.js b/user/server.js index dbdd2f0..fd5a18a 100644 --- a/user/server.js +++ b/user/server.js @@ -43,15 +43,11 @@ app.use((req, res, next) => { app.use((req, res, next) => { let dcs = [ + "asia-northeast2", + "asia-south1", + "europe-west3", "us-east1", - "us-east2", - "us-east3", - "us-east4", - "us-central1", - "us-west1", - "us-west2", - "eu-west3", - "eu-west4" + "us-west1" ]; let span = instana.currentSpan(); span.annotate('custom.sdk.tags.datacenter', dcs[Math.floor(Math.random() * dcs.length)]);