Closed yamnihcg closed 3 years ago
EventBatchSender:
Default (to US Prod, US License Key): Successful Set Region (to US Prod, US License Key): Successful Set Region (to EU Prod, EU License Key): Successful User Provided Endpoint: Successful
MetricBatchSender:
Default (to US Prod, US License Key): Successful Set Region (to US Prod, US License Key): Successful Set Region (to EU Prod, EU License Key): Successful User Provided Endpoint: Successful
LogBatchSender:
Default (to US Prod, US License Key): Successful Set Region (to US Prod, US License Key): Successful Set Region (to EU Prod, EU License Key): Successful User Provided Endpoint: Successful
SpanBatchSender:
Default (to US Prod, US License Key): Successful Set Region (to US Prod, US License Key): Successful Set Region (to EU Prod, EU License Key): Successful User Provided Endpoint: Successful
This looks great @yamnihcg and thank you for persistently chipping away at this! 🚀 🚀
The following PR adds the .setRegion() method to the SenderConfigurationBuilder API. This method allows you to define a region (US or EU) so that the appropriate production endpoint (corresponding to that region) is used. The default endpoint is the US production endpoint.
If you want to use an endpoint other than the US / EU production endpoints, use the existing .endpoint() method in the SenderConfigurationBuilder API.
Below are some examples on how to use the new API. In these examples, we use the MetricBatchSender / MetricBatchSenderFactory.
US Production
Note: Since the default endpoint is the US production endpoint, we did not use .setRegion() in this example. Also, a US license key is needed to send data to this endpoint.
EU Production
Note: An EU license key is needed to send data to this endpoint.
Staging / Setting Your Own URL