Skip to content

Commit

Permalink
feat: Add Sending Queue Option for OpenSearch
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Yves NOLEN <[email protected]>
  • Loading branch information
jynolen committed Jul 4, 2024
1 parent b95672e commit 322436a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .chloggen/feature_opensearch-sending-queue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

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

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Add Sending Queue to enable persistent queue in case of upstream failure"

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

# (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:

# 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]
3 changes: 3 additions & 0 deletions exporter/opensearchexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Supports standard TLS settings as part of HTTP settings. See [TLS Configuration/
### Retry Options
- `retry_on_failure`: See [retry_on_failure](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)

### Sending Queue Options
- `sending_queue`: See [sending_queue](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)

### Timeout Options
- `timeout` : See [timeout](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)

Expand Down
1 change: 1 addition & 0 deletions exporter/opensearchexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const (
type Config struct {
confighttp.ClientConfig `mapstructure:"http"`
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
exporterhelper.QueueSettings `mapstructure:"sending_queue"`
exporterhelper.TimeoutSettings `mapstructure:",squash"`
MappingsSettings `mapstructure:"mapping"`

Expand Down
2 changes: 2 additions & 0 deletions exporter/opensearchexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func createTracesExporter(ctx context.Context,
exporterhelper.WithStart(te.Start),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
exporterhelper.WithRetry(c.BackOffConfig),
exporterhelper.WithQueue(c.QueueSettings),
exporterhelper.WithTimeout(c.TimeoutSettings))
}

Expand All @@ -70,5 +71,6 @@ func createLogsExporter(ctx context.Context,
exporterhelper.WithStart(le.Start),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}),
exporterhelper.WithRetry(c.BackOffConfig),
exporterhelper.WithQueue(c.QueueSettings),
exporterhelper.WithTimeout(c.TimeoutSettings))
}

0 comments on commit 322436a

Please sign in to comment.