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

josema/ch86072/improve-metrics-in-case-of-on-prem #1685

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

josemazo
Copy link
Contributor

@josemazo josemazo commented Sep 3, 2020

CH story ch86072

@josemazo josemazo requested a review from Jesus89 September 3, 2020 10:56
Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I suggested moving some code to utility functions to improve readability

cartoframes/utils/metrics.py Outdated Show resolved Hide resolved
json_data = build_metrics_data(event_name, extra_metrics_data)
result = requests.post('https://bmetrics.cartodb.net', json=json_data, timeout=2)
def post_metrics(event_name, extra_metrics_data, server_domain_tld):
metrics_server = STAG_METRICS_SERVER if server_domain_tld == STAG_DOMAIN_TLD else PROD_METRICS_SERVER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this logic to utils.get_metrics_server(server_domain_tld) or get_metrics_server(server_domain_tld) (this file)

cartoframes/utils/metrics.py Outdated Show resolved Hide resolved
@josemazo
Copy link
Contributor Author

josemazo commented Sep 4, 2020

Re CR, please!!

Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Jesus89 Jesus89 merged commit 61ba443 into develop Sep 4, 2020
@Jesus89 Jesus89 deleted the josema/ch86072/improve-metrics-in-case-of-on-prem branch September 4, 2020 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants