Merge pull request #16190 from CartoDB/chore/named-maps-api-tweaks

Fix named maps API retries + temporarily silence logging
pull/16196/head^2
Jorge Tarrero 4 years ago committed by GitHub
commit 46b34d96d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,7 @@ sudo make install
- New BigQuery connector [16029](https://github.com/CartoDB/cartodb/pull/16029)
- Add access to DO samples. Refactor samples/subscriptions UI [#15910](https://github.com/CartoDB/cartodb/pull/15910)
- Integrate new map_views metric. [#15969](https://github.com/CartoDB/cartodb/pull/15969)
- Fix named maps API retries on destroy event [#16190](https://github.com/CartoDB/cartodb/pull/16190)
- Add preview/visualization of maps in DO catalog [#15973](https://github.com/CartoDB/cartodb/pull/15973)
- Add new user metrics to Home page [#15950](https://github.com/CartoDB/cartodb/pull/15950)
- Replace CRUD user operations in Central API client by publishing messages to the Message Broker [#16035](https://github.com/CartoDB/cartodb/pull/16035)

@ -98,7 +98,7 @@ module Carto
response.response_body
elsif (response_code_string.match?(/^5/) || response.code == 429) && retries < MAX_RETRY_ATTEMPTS
sleep(RETRY_TIME_SECONDS**retries)
update(retries: retries + 1)
destroy(retries: retries + 1)
else
log_response(response, 'destroy') unless response.code == 404
end
@ -177,20 +177,22 @@ module Carto
end
def log_response(response, action)
log_error(
message: 'Error in named maps API',
current_user: user,
visualization_id: visualization.id,
action: action,
request_url: response.request.url,
status: response.code,
response_body: response.body
)
rescue Encoding::UndefinedConversionError => e
# Hotfix for preventing https://rollbar.com/carto/CartoDB/items/41457 until we find the root cause
# https://cartoteam.slack.com/archives/CEQLWTW9Z/p1599134417001900
# https://app.clubhouse.io/cartoteam/story/101908/fix-encoding-error-while-logging-request
Rollbar.error(e)
# Suppressed for now, we have to work on this trace, it's only
# generating noise without any relevant information.
# log_warning(
# message: 'Error in named maps API',
# current_user: user,
# visualization_id: visualization.id,
# action: action,
# request_url: response.request.url,
# status: response.code,
# response_body: response.body
# )
# rescue Encoding::UndefinedConversionError => e
# # Hotfix for preventing https://rollbar.com/carto/CartoDB/items/41457 until we find the root cause
# # https://cartoteam.slack.com/archives/CEQLWTW9Z/p1599134417001900
# # https://app.clubhouse.io/cartoteam/story/101908/fix-encoding-error-while-logging-request
# # Rollbar.error(e)
end
def log_context

Loading…
Cancel
Save