Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract constant for default sender endpoint #144

Merged
merged 1 commit into from Feb 1, 2019

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Member

commented Jan 30, 2019

This change brings three main benefits:

  1. Clients can now programmatically access the value of the default sender endpoint, for example to forward requests to it. This benefit is demonstrated by the changes to the test code.

  2. Avoid copy/paste of the endpoint URL between async and sync senders.

  3. Defaulting the service_endpoint_url to None instead of the string value and checking against null later to look up the default endpoint url means that the class now supports use-cases like sender = AsynchronousSender(os.getenv('APPINSIGHTS_ENDPOINT_URL')) which simplifies client code that may want to optionally override the service url. This benefit is demonstrated by the changes to the Django and Flask integrations.

Extract constant for default sender endpoint
This change brings three main benefits:

1) Clients can now programmatically access the value of the default
   sender endpoint, for example to forward requests to it. This benefit
   is demonstrated by the changes to the test code.

2) Avoid copy/paste of the endpoint URL between async and sync senders.

3) Defaulting the service_endpoint_url to None instead of the string
   value and checking against null later to look up the default endpoint
   url means that the class now supports use-cases like
   `Sender(os.getenv('SERVICE_URL'))` which simplifies client code that
   may want to optionally override the service url. This benefit is
   demonstrated by the changes to the Django and Flask integrations.
@SergeyKanzhelev

This comment has been minimized.

Copy link
Member

commented Feb 1, 2019

sorry for delay. I'll also add a line to CHANGELOG.md.

@SergeyKanzhelev SergeyKanzhelev merged commit 520d11c into microsoft:develop Feb 1, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details

@c-w c-w deleted the CatalystCode:default-endpoint-url branch Feb 1, 2019

@c-w

This comment has been minimized.

Copy link
Member Author

commented Feb 1, 2019

Thanks for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.