Skip to content

Commit

Permalink
feat: Add Sending Queue Option for OpenSearch
Browse files Browse the repository at this point in the history
  • Loading branch information
jynolen committed Oct 22, 2024
1 parent 8d9f682 commit 10ae156
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .chloggen/feature_opensearch-sending-queue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 @@ -32,6 +32,7 @@ type Config struct {
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"`
MappingsSettings `mapstructure:"mapping"`
QueueConfig exporterhelper.QueueConfig `mapstructure:"sending_queue"`

// The Observability indices would follow the recommended for immutable data stream ingestion pattern using
// the data_stream concepts. See https://opensearch.org/docs/latest/dashboards/im-dashboards/datastream/
Expand Down
2 changes: 2 additions & 0 deletions exporter/opensearchexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func createTracesExporter(ctx context.Context,
exporterhelper.WithStart(te.Start),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
exporterhelper.WithRetry(c.BackOffConfig),
exporterhelper.WithQueue(c.QueueConfig),
exporterhelper.WithTimeout(c.TimeoutSettings))
}

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

0 comments on commit 10ae156

Please sign in to comment.