Skip to content

Commit 0ed85d6

Browse files
author
Roja Reddy Sareddy
committed
change: Allow telemetry only in supported regions
1 parent 25f16ef commit 0ed85d6

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

src/sagemaker/telemetry/constants.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,43 @@ def __str__(self): # pylint: disable=E0307
4444
return self.name
4545

4646

47+
class Region(str, Enum):
48+
"""Telemetry: List of all supported AWS regions."""
49+
50+
# Classic
51+
US_EAST_1 = "us-east-1" # IAD
52+
US_EAST_2 = "us-east-2" # CMH
53+
US_WEST_1 = "us-west-1" # SFO
54+
US_WEST_2 = "us-west-2" # PDX
55+
AP_NORTHEAST_1 = "ap-northeast-1" # NRT
56+
AP_NORTHEAST_2 = "ap-northeast-2" # ICN
57+
AP_NORTHEAST_3 = "ap-northeast-3" # KIX
58+
AP_SOUTH_1 = "ap-south-1" # BOM
59+
AP_SOUTHEAST_1 = "ap-southeast-1" # SIN
60+
AP_SOUTHEAST_2 = "ap-southeast-2" # SYD
61+
CA_CENTRAL_1 = "ca-central-1" # YUL
62+
EU_CENTRAL_1 = "eu-central-1" # FRA
63+
EU_NORTH_1 = "eu-north-1" # ARN
64+
EU_WEST_1 = "eu-west-1" # DUB
65+
EU_WEST_2 = "eu-west-2" # LHR
66+
EU_WEST_3 = "eu-west-3" # CDG
67+
SA_EAST_1 = "sa-east-1" # GRU
68+
# Opt-in
69+
AP_EAST_1 = "ap-east-1" # HKG
70+
AP_SOUTHEAST_3 = "ap-southeast-3" # CGK
71+
AF_SOUTH_1 = "af-south-1" # CPT
72+
EU_SOUTH_1 = "eu-south-1" # MXP
73+
ME_SOUTH_1 = "me-south-1" # BAH
74+
MX_CENTRAL_1 = "mx-central-1" # QRO
75+
AP_SOUTHEAST_7 = "ap-southeast-7" # BKK
76+
AP_SOUTH_2 = "ap-south-2" # HYD
77+
AP_SOUTHEAST_4 = "ap-southeast-4" # MEL
78+
EU_CENTRAL_2 = "eu-central-2" # ZRH
79+
EU_SOUTH_2 = "eu-south-2" # ZAZ
80+
IL_CENTRAL_1 = "il-central-1" # TLV
81+
ME_CENTRAL_1 = "me-central-1" # DXB
82+
83+
4784
class Region(str, Enum):
4885
# Classic
4986
US_EAST_1 = "us-east-1" # IAD

src/sagemaker/telemetry/telemetry_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _send_telemetry_request(
197197
try:
198198
Region(region)
199199
except ValueError:
200-
logger.debug(
200+
logger.warning(
201201
"Region not found in supported regions. Telemetry request will not be emitted."
202202
)
203203
return

0 commit comments

Comments
 (0)