Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Main (unreleased)
### Other changes

- Mark `pyroscope.receive_http` and `pyroscope.relabel` components as GA. (@marcsanmi)
- Upgrade `otelcol` components from OpenTelemetry v0.126.0 to v0.127.0 (@korniltsev)

v1.9.1
-----------------
Expand Down
362 changes: 181 additions & 181 deletions go.mod

Large diffs are not rendered by default.

778 changes: 390 additions & 388 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions internal/component/otelcol/exporter/awss3/awss3.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ func (args *S3Uploader) Convert() awss3exporter.S3UploaderConfig {
Compression: args.Compression,
ACL: args.ACL,
StorageClass: args.StorageClass,
// todo: allow configuring retries https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/39509
RetryMode: awss3exporter.DefaultRetryMode,
RetryMaxAttempts: awss3exporter.DefaultRetryMaxAttempts,
RetryMaxBackoff: awss3exporter.DefaultRetryMaxBackoff,
Comment on lines +158 to +161
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will want to expose this in Alloy config and add to documentation.

Similarly, we'll need to go through changelog and ensure we expose all the new functionality or describe any breaking changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, the current version of the PR does not change behavior and should not break anything.
Do you mind creating an issue and lets work on this in a followup PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, opened this one: #3844

}
}

Expand Down
6 changes: 6 additions & 0 deletions internal/component/otelcol/exporter/awss3/awss3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ func TestConfig(t *testing.T) {
Region: "us-east-1",
ACL: "",
StorageClass: "STANDARD",
RetryMode: "standard",
RetryMaxAttempts: 3,
RetryMaxBackoff: 20 * time.Second,
},
MarshalerName: "otlp_json",
QueueSettings: exporterhelper.QueueBatchConfig{
Expand Down Expand Up @@ -259,6 +262,9 @@ func TestConfig(t *testing.T) {
Region: "us-east-2",
ACL: "",
StorageClass: "STANDARD",
RetryMode: "standard",
RetryMaxAttempts: 3,
RetryMaxBackoff: 20 * time.Second,
},
MarshalerName: "otlp_json",
QueueSettings: exporterhelper.QueueBatchConfig{
Expand Down
6 changes: 3 additions & 3 deletions internal/component/otelcol/receiver/otlp/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ func (args *HTTPConfigArguments) Convert() (*otlpreceiver.HTTPConfig, error) {

return &otlpreceiver.HTTPConfig{
ServerConfig: *httpServerArgs,
TracesURLPath: args.TracesURLPath,
MetricsURLPath: args.MetricsURLPath,
LogsURLPath: args.LogsURLPath,
TracesURLPath: otlpreceiver.SanitizedURLPath(args.TracesURLPath),
MetricsURLPath: otlpreceiver.SanitizedURLPath(args.MetricsURLPath),
LogsURLPath: otlpreceiver.SanitizedURLPath(args.LogsURLPath),
}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func toHTTPConfigArguments(cfg *otlpreceiver.HTTPConfig) *otlp.HTTPConfigArgumen
return &otlp.HTTPConfigArguments{
HTTPServerArguments: toHTTPServerArguments(&cfg.ServerConfig),

TracesURLPath: cfg.TracesURLPath,
MetricsURLPath: cfg.MetricsURLPath,
LogsURLPath: cfg.LogsURLPath,
TracesURLPath: string(cfg.TracesURLPath),
MetricsURLPath: string(cfg.MetricsURLPath),
LogsURLPath: string(cfg.LogsURLPath),
}
}

Expand Down
13 changes: 10 additions & 3 deletions internal/static/traces/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
"strings"
"time"

"go.uber.org/multierr"
"gopkg.in/yaml.v2"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling"
Expand All @@ -38,8 +41,6 @@ import (
"go.opentelemetry.io/collector/processor/batchprocessor"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
"go.uber.org/multierr"
"gopkg.in/yaml.v2"

promsdconsumer "github.com/grafana/alloy/internal/static/traces/promsdprocessor/consumer"

Expand Down Expand Up @@ -714,11 +715,17 @@ func (c *InstanceConfig) OtelConfig() (*otelcol.Config, error) {
"metrics_instance": c.SpanMetrics.MetricsInstance,
}
} else if len(c.SpanMetrics.MetricsInstance) == 0 && len(c.SpanMetrics.HandlerEndpoint) != 0 {
constLabels := map[string]string{}
if c.SpanMetrics.ConstLabels != nil {
// Temporary workaround for https://github.com/open-telemetry/opentelemetry-collector/issues/13117
// Remove after upgrade to otel 128
constLabels = *c.SpanMetrics.ConstLabels
}
exporterName = "prometheus"
exporters[exporterName] = map[string]interface{}{
"endpoint": c.SpanMetrics.HandlerEndpoint,
"namespace": namespace,
"const_labels": c.SpanMetrics.ConstLabels,
"const_labels": constLabels,
}
} else {
return nil, fmt.Errorf("must specify a prometheus instance or a metrics handler endpoint to export the metrics")
Expand Down
10 changes: 7 additions & 3 deletions internal/static/traces/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"strings"
"testing"

"gopkg.in/yaml.v2"

"github.com/grafana/alloy/internal/static/traces/pushreceiver"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/otelcol"
"go.opentelemetry.io/collector/pipeline"
"gopkg.in/yaml.v2"
)

func tmpFile(t *testing.T, content string) (*os.File, func()) {
Expand Down Expand Up @@ -1742,10 +1743,13 @@ load_balancing:
if len(tc.expectedProcessors[componentID]) > 0 {
assert.NotNil(t, tc.expectedProcessors)
var p pipeline.ID
signal := pipeline.Signal{}
err = signal.UnmarshalText([]byte(componentID.Type().String()))
require.NoError(t, err)
if componentID.Name() != "" {
p = pipeline.MustNewIDWithName(componentID.Type().String(), componentID.Name())
p = pipeline.NewIDWithName(signal, componentID.Name())
} else {
p = pipeline.MustNewID(componentID.Type().String())
p = pipeline.NewID(signal)
}

assert.NotNil(t, actualConfig.Service.Pipelines[p])
Expand Down