Cache error responses for cloudfoundry apps metadata#19181
Cache error responses for cloudfoundry apps metadata#19181jsoriano merged 5 commits intoelastic:masterfrom
Conversation
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Cache error responses when requesting Cloud Foundry apps metadata to avoid hitting continuously the API when there are missing applications.
6ef177a to
a783612
Compare
|
Pinging @elastic/integrations-platforms (Team:Platforms) |
…ta-ignore-missing-apps
|
jenkins run the tests please |
|
Merging as there was a green build of the same changeset two days ago and current failures seem to be related to hitting some limit on GH APIs 🤞 |
Cache error responses when requesting Cloud Foundry apps metadata to avoid hitting continuously the API when there are missing applications. (cherry picked from commit 9c0b63d)
…ne-beats * upstream/master: (35 commits) [ci] fix env variable name for xpack filebeats (elastic#19617) Cache error responses for cloudfoundry apps metadata (elastic#19181) ci: user fixed type of agent (elastic#19625) Input v2 cursor testing (elastic#19573) Update Jenkinsfile to not inspect removed vendor (elastic#19610) Fix ordering and duplicate configs on autodiscover (elastic#19317) Prepare input/file for changes in the registrar (elastic#19516) Cursor input and manager implementation (elastic#19571) [Filebeat] Fix tls mapping in suricata module (elastic#19494) [Ingest Manager] Make Agent beta and Constraints experimental (elastic#19586) Accept prefix as metric_types for stackdriver metricset in GCP (elastic#19345) Implement memlog store operations (elastic#19533) introduce journalbeat/pkg in order to provide reusable shared code (elastic#19581) Add descriptions to HAProxy fields in Metricbeat (elastic#19561) ci: apm-server-update trigered only on upstream, comments, and manual triggered (elastic#19590) ci: enable upstream triggering on the packaging job (elastic#19589) ci: some jjbb improvements (elastic#19588) [MetricBeat] set tags correctly if the dimension value is ARN (elastic#19433) [Filebeat] Add default_fields: false to fields.yml in aws module (elastic#19568) Add publisher implementation for stateful inputs (elastic#19530) ...
Cache error responses when requesting Cloud Foundry apps metadata to avoid hitting continuously the API when there are missing applications.
What does this PR do?
Cache error responses when requesting Cloud Foundry apps metadata to
avoid hitting continuously the API when there are failures.
The original motivation for this change was to handle
AppNotFounderrors,but the truth is that continuously retrying on any error is not very good, so
this change effectively introduces a delay between retries on any error from
the API. It looks safer by now. We can reconsider this in the future if we see
that some other error should be handled in a different way.
An specific flag
cache_retry_delayis also added to configure how long Beatsshould wait before retrying again in case of error.
Why is it important?
Sometimes events are received for apps that cannot be found on the API, on
these cases Beats continuously hit the API to try to get the metadata. This
provokes unnecessary load on API servers of big deployments.
Checklist
I have made corresponding change to the default configuration filesCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.