Skip to content

Commit a529f61

Browse files
committed
feat: Add Sending Queue Option for OpenSearch
1 parent 61f0fb0 commit a529f61

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use this changelog template to create an entry for release notes.
2+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
3+
change_type: enhancement
4+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
5+
component: opensearchexporter
6+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
7+
note: "Add Sending Queue to enable persistent queue in case of upstream failure"
8+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
9+
issues: [33919]
10+
# (Optional) One or more lines of additional information to render under the primary note.
11+
# These lines will be padded with 2 spaces and then inserted directly into the document.
12+
# Use pipe (|) for multiline entries.
13+
subtext:
14+
# If your change doesn't affect end users or the exported elements of any package,
15+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
16+
# Optional: The change log or logs in which this entry should be included.
17+
# e.g. '[user]' or '[user, api]'
18+
# Include 'user' if the change is relevant to end users.
19+
# Include 'api' if there is a change to a library API.
20+
# Default: '[user]'
21+
change_logs: [user]

exporter/opensearchexporter/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Supports standard TLS settings as part of HTTP settings. See [TLS Configuration/
3939
### Retry Options
4040
- `retry_on_failure`: See [retry_on_failure](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)
4141

42+
### Sending Queue Options
43+
- `sending_queue`: See [sending_queue](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)
44+
4245
### Timeout Options
4346
- `timeout` : See [timeout](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)
4447

exporter/opensearchexporter/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type Config struct {
3232
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
3333
TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"`
3434
MappingsSettings `mapstructure:"mapping"`
35+
QueueConfig exporterhelper.QueueConfig `mapstructure:"sending_queue"`
3536

3637
// The Observability indices would follow the recommended for immutable data stream ingestion pattern using
3738
// the data_stream concepts. See https://opensearch.org/docs/latest/dashboards/im-dashboards/datastream/

exporter/opensearchexporter/factory.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func createTracesExporter(ctx context.Context,
5151
exporterhelper.WithStart(te.Start),
5252
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
5353
exporterhelper.WithRetry(c.BackOffConfig),
54+
exporterhelper.WithQueue(c.QueueConfig),
5455
exporterhelper.WithTimeout(c.TimeoutSettings))
5556
}
5657

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

0 commit comments

Comments
 (0)