Skip to content

Commit

Permalink
[exporter/elasticsearch] Change default retry.retry_to_status to [429] (
Browse files Browse the repository at this point in the history
#34684)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Breaking change to change default retry_on_status to 429

**Link to tracking Issue:** <Issue number if applicable>
Fixes
#32584

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
  • Loading branch information
carsonip authored Aug 23, 2024
1 parent f0d7e7f commit a19aa30
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .chloggen/elasticsearchexporter_retry-on-status-429.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: elasticsearchexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change default retry.retry_on_status to [429]

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [32584]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
To retain the previous behavior, set retry.retry_on_status to `[429, 500, 502, 503, 504]`.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
2 changes: 1 addition & 1 deletion exporter/elasticsearchexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ The behaviour of this bulk indexing can be configured with the following setting
- `max_requests` (default=3): Number of HTTP request retries.
- `initial_interval` (default=100ms): Initial waiting time if a HTTP request failed.
- `max_interval` (default=1m): Max waiting time if a HTTP request failed.
- `retry_on_status` (default=[429, 500, 502, 503, 504]): Status codes that trigger request or document level retries. Request level retry and document level retry status codes are shared and cannot be configured separately. To avoid duplicates, it is recommended to set it to `[429]`. WARNING: The default will be changed to `[429]` in the future.
- `retry_on_status` (default=[429]): Status codes that trigger request or document level retries. Request level retry and document level retry status codes are shared and cannot be configured separately. To avoid duplicates, it defaults to `[429]`.

> [!NOTE]
> The `flush` config will be ignored when `batcher::enabled` config is explicitly set to `true` or `false`.
Expand Down
4 changes: 0 additions & 4 deletions exporter/elasticsearchexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ func createDefaultConfig() component.Config {
MaxInterval: 1 * time.Minute,
RetryOnStatus: []int{
http.StatusTooManyRequests,
http.StatusInternalServerError,
http.StatusBadGateway,
http.StatusServiceUnavailable,
http.StatusGatewayTimeout,
},
},
Mapping: MappingsSettings{
Expand Down

0 comments on commit a19aa30

Please sign in to comment.