-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/v0.37.x] Prepare release v0.37.0 (#2584)
* go mod vendor * Add patch file for logging fix in core * Add PRWE ctx patch * bump grpc version * go mod vendor * bump version to v0.37.0 * go mod tidy
- Loading branch information
1 parent
df65efa
commit 9d46594
Showing
14,427 changed files
with
4,391,252 additions
and
30 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.36.0 | ||
v0.37.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Changelog | ||
|
||
## [v0.37.0](https://github.com/aws-observability/aws-otel-collector/tree/v0.37.0) (2024-01-19) | ||
|
||
[Full Changelog](https://github.com/aws-observability/aws-otel-collector/compare/v0.36.0...v0.37.0) | ||
|
||
**Changelog** | ||
|
||
- **Patch** [opentelemetry-collector/exporterhelper] Cleanup logging for export failures [#9282](https://github.com/open-telemetry/opentelemetry-collector/pull/9282) | ||
- **Patch** [opentelemetry-collector-contrib/exporter/prometheusremotewrite] Fix: Validate context is canceled during retries [#30308] | ||
- Bump `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` dependency to v0.47.0 | ||
|
||
**Merged pull requests:** | ||
|
||
- Remove Deprecated dynatrace exporter [\#2568](https://github.com/aws-observability/aws-otel-collector/pull/2568) ([vasireddy99](https://github.com/vasireddy99)) | ||
|
||
|
||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go | ||
index 2c5a4e966..b5e7aa39a 100644 | ||
--- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go | ||
+++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go | ||
@@ -38,20 +38,6 @@ func (b *baseRequestSender) setNextSender(nextSender requestSender) { | ||
b.nextSender = nextSender | ||
} | ||
|
||
-type errorLoggingRequestSender struct { | ||
- baseRequestSender | ||
- logger *zap.Logger | ||
- message string | ||
-} | ||
- | ||
-func (l *errorLoggingRequestSender) send(ctx context.Context, req Request) error { | ||
- err := l.baseRequestSender.send(ctx, req) | ||
- if err != nil { | ||
- l.logger.Error(l.message, zap.Int("dropped_items", req.ItemsCount()), zap.Error(err)) | ||
- } | ||
- return err | ||
-} | ||
- | ||
type obsrepSenderFactory func(obsrep *ObsReport) requestSender | ||
|
||
// Option apply changes to baseExporter. | ||
@@ -86,10 +72,7 @@ func WithTimeout(timeoutSettings TimeoutSettings) Option { | ||
func WithRetry(config configretry.BackOffConfig) Option { | ||
return func(o *baseExporter) { | ||
if !config.Enabled { | ||
- o.retrySender = &errorLoggingRequestSender{ | ||
- logger: o.set.Logger, | ||
- message: "Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors", | ||
- } | ||
+ o.exportFailureMessage += " Try enabling retry_on_failure config option to retry on retryable errors." | ||
return | ||
} | ||
o.retrySender = newRetrySender(config, o.set) | ||
@@ -105,13 +88,14 @@ func WithQueue(config QueueSettings) Option { | ||
panic("queueing is not available for the new request exporters yet") | ||
} | ||
if !config.Enabled { | ||
- o.queueSender = &errorLoggingRequestSender{ | ||
- logger: o.set.Logger, | ||
- message: "Exporting failed. Dropping data. Try enabling sending_queue to survive temporary failures.", | ||
- } | ||
+ o.exportFailureMessage += " Try enabling sending_queue to survive temporary failures." | ||
return | ||
} | ||
- o.queueSender = newQueueSender(config, o.set, o.signal, o.marshaler, o.unmarshaler) | ||
+ consumeErrHandler := func(err error, req Request) { | ||
+ o.set.Logger.Error("Exporting failed. Dropping data."+o.exportFailureMessage, | ||
+ zap.Error(err), zap.Int("dropped_items", req.ItemsCount())) | ||
+ } | ||
+ o.queueSender = newQueueSender(config, o.set, o.signal, o.marshaler, o.unmarshaler, consumeErrHandler) | ||
} | ||
} | ||
|
||
@@ -137,6 +121,9 @@ type baseExporter struct { | ||
set exporter.CreateSettings | ||
obsrep *ObsReport | ||
|
||
+ // Message for the user to be added with an export failure message. | ||
+ exportFailureMessage string | ||
+ | ||
// Chain of senders that the exporter helper applies before passing the data to the actual exporter. | ||
// The data is handled by each sender in the respective order starting from the queueSender. | ||
// Most of the senders are optional, and initialized with a no-op path-through sender. | ||
@@ -182,7 +169,12 @@ func newBaseExporter(set exporter.CreateSettings, signal component.DataType, req | ||
|
||
// send sends the request using the first sender in the chain. | ||
func (be *baseExporter) send(ctx context.Context, req Request) error { | ||
- return be.queueSender.send(ctx, req) | ||
+ err := be.queueSender.send(ctx, req) | ||
+ if err != nil { | ||
+ be.set.Logger.Error("Exporting failed. Rejecting data."+be.exportFailureMessage, | ||
+ zap.Error(err), zap.Int("rejected_items", req.ItemsCount())) | ||
+ } | ||
+ return err | ||
} | ||
|
||
// connectSenders connects the senders in the predefined order. | ||
diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go | ||
index 423b7657e..1ee3c1ad5 100644 | ||
--- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go | ||
+++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go | ||
@@ -17,7 +17,6 @@ import ( | ||
"go.uber.org/zap" | ||
|
||
"go.opentelemetry.io/collector/component" | ||
- "go.opentelemetry.io/collector/consumer/consumererror" | ||
"go.opentelemetry.io/collector/exporter" | ||
"go.opentelemetry.io/collector/exporter/exporterhelper/internal" | ||
"go.opentelemetry.io/collector/internal/obsreportconfig" | ||
@@ -86,7 +85,7 @@ type queueSender struct { | ||
} | ||
|
||
func newQueueSender(config QueueSettings, set exporter.CreateSettings, signal component.DataType, | ||
- marshaler RequestMarshaler, unmarshaler RequestUnmarshaler) *queueSender { | ||
+ marshaler RequestMarshaler, unmarshaler RequestUnmarshaler, consumeErrHandler func(error, Request)) *queueSender { | ||
|
||
isPersistent := config.StorageID != nil | ||
var queue internal.Queue[Request] | ||
@@ -114,21 +113,15 @@ func newQueueSender(config QueueSettings, set exporter.CreateSettings, signal co | ||
logger: set.TelemetrySettings.Logger, | ||
meter: set.TelemetrySettings.MeterProvider.Meter(scopeName), | ||
} | ||
- qs.consumers = internal.NewQueueConsumers(queue, config.NumConsumers, qs.consume) | ||
- return qs | ||
-} | ||
- | ||
-// consume is the function that is executed by the queue consumers to send the data to the next consumerSender. | ||
-func (qs *queueSender) consume(ctx context.Context, req Request) error { | ||
- err := qs.nextSender.send(ctx, req) | ||
- if err != nil && !consumererror.IsPermanent(err) { | ||
- qs.logger.Error( | ||
- "Exporting failed. No more retries left. Dropping data.", | ||
- zap.Error(err), | ||
- zap.Int("dropped_items", req.ItemsCount()), | ||
- ) | ||
+ consumeFunc := func(ctx context.Context, req Request) error { | ||
+ err := qs.nextSender.send(ctx, req) | ||
+ if err != nil { | ||
+ consumeErrHandler(err, req) | ||
+ } | ||
+ return err | ||
} | ||
- return err | ||
+ qs.consumers = internal.NewQueueConsumers(queue, config.NumConsumers, consumeFunc) | ||
+ return qs | ||
} | ||
|
||
// Start is invoked during service startup. | ||
@@ -210,11 +203,7 @@ func (qs *queueSender) send(ctx context.Context, req Request) error { | ||
|
||
span := trace.SpanFromContext(c) | ||
if err := qs.queue.Offer(c, req); err != nil { | ||
- qs.logger.Error( | ||
- "Dropping data because sending_queue is full. Try increasing queue_size.", | ||
- zap.Int("dropped_items", req.ItemsCount()), | ||
- ) | ||
- span.AddEvent("Dropped item, sending_queue is full.", trace.WithAttributes(qs.traceAttribute)) | ||
+ span.AddEvent("Failed to enqueue item.", trace.WithAttributes(qs.traceAttribute)) | ||
return err | ||
} | ||
|
||
diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go | ||
index 1de3a23c5..1bf241578 100644 | ||
--- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go | ||
+++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go | ||
@@ -93,19 +93,14 @@ func (rs *retrySender) send(ctx context.Context, req Request) error { | ||
|
||
// Immediately drop data on permanent errors. | ||
if consumererror.IsPermanent(err) { | ||
- rs.logger.Error( | ||
- "Exporting failed. The error is not retryable. Dropping data.", | ||
- zap.Error(err), | ||
- zap.Int("dropped_items", req.ItemsCount()), | ||
- ) | ||
- return err | ||
+ return fmt.Errorf("not retryable error: %w", err) | ||
} | ||
|
||
req = extractPartialRequest(req, err) | ||
|
||
backoffDelay := expBackoff.NextBackOff() | ||
if backoffDelay == backoff.Stop { | ||
- return fmt.Errorf("max elapsed time expired %w", err) | ||
+ return fmt.Errorf("no more retries left: %w", err) | ||
} | ||
|
||
throttleErr := throttleRetry{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
commit 75eaa256d468f11a593e7af2f999601250d03ba4 | ||
Author: Bryan Aguilar <[email protected]> | ||
Date: Thu Jan 18 16:00:12 2024 -0800 | ||
|
||
add prwe ctx cancel patch | ||
|
||
diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go | ||
index 433083e5..52269dc4 100644 | ||
--- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go | ||
+++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go | ||
@@ -236,6 +236,15 @@ func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequ | ||
|
||
// executeFunc can be used for backoff and non backoff scenarios. | ||
executeFunc := func() error { | ||
+ // check there was no timeout in the component level to avoid retries | ||
+ // to continue to run after a timeout | ||
+ select { | ||
+ case <-ctx.Done(): | ||
+ return backoff.Permanent(ctx.Err()) | ||
+ default: | ||
+ // continue | ||
+ } | ||
+ | ||
// Create the HTTP POST request to send to the endpoint | ||
req, err := http.NewRequestWithContext(ctx, "POST", prwe.endpointURL.String(), bytes.NewReader(compressedData)) | ||
if err != nil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.