From afb4c87d7fe34241f7f6ffac01553bad8b6a2642 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 30 Jun 2024 18:37:46 +0200 Subject: [PATCH 01/52] Add scylladb docker-compose to exclusion list for major/patch upgrades (#5688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | scylladb/scylla | patch | `5.4.7` -> `5.4.8` | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index bb053e66ea7..3fdb82d8bfc 100644 --- a/renovate.json +++ b/renovate.json @@ -23,7 +23,8 @@ "docker-compose/kafka/docker-compose.yml", "docker-compose/monitor/docker-compose.yml", "docker-compose/opensearch/v1/docker-compose.yml", - "docker-compose/opensearch/v2/docker-compose.yml" + "docker-compose/opensearch/v2/docker-compose.yml", + "plugin/storage/scylladb/docker-compose.yml" ], "matchUpdateTypes": ["major", "patch"], "enabled": false From 301dbec7f86953dadce4f7f4323d468f33906932 Mon Sep 17 00:00:00 2001 From: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Date: Sun, 30 Jun 2024 22:15:00 +0530 Subject: [PATCH 02/52] Create metrics.Factory adapter for OTEL Metrics (#5661) **Which problem is this PR solving?** This PR addresses a part of the issue [#5633 ](https://github.com/jaegertracing/jaeger/issues/5633) **Description of the changes** This is a Draft PR to bridge the OTEL Metrics instead of using Internal Metrics to minimize code changes. **How was this change tested?** The changes were tested by running the following command: ```bash make test ``` **Checklist** - [x] I have read [CONTRIBUTING_GUIDELINES.md](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md) - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - `for jaeger: make lint test` - `for jaeger-ui: yarn lint` and `yarn test` --------- Signed-off-by: Wise-Wizard Signed-off-by: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- internal/metrics/benchmark_test.go | 113 ++++++++ internal/metrics/otelmetrics/counter.go | 20 ++ internal/metrics/otelmetrics/factory.go | 133 ++++++++++ internal/metrics/otelmetrics/factory_test.go | 256 +++++++++++++++++++ internal/metrics/otelmetrics/gauge.go | 20 ++ internal/metrics/otelmetrics/histogram.go | 20 ++ internal/metrics/otelmetrics/timer.go | 21 ++ 7 files changed, 583 insertions(+) create mode 100644 internal/metrics/benchmark_test.go create mode 100644 internal/metrics/otelmetrics/counter.go create mode 100644 internal/metrics/otelmetrics/factory.go create mode 100644 internal/metrics/otelmetrics/factory_test.go create mode 100644 internal/metrics/otelmetrics/gauge.go create mode 100644 internal/metrics/otelmetrics/histogram.go create mode 100644 internal/metrics/otelmetrics/timer.go diff --git a/internal/metrics/benchmark_test.go b/internal/metrics/benchmark_test.go new file mode 100644 index 00000000000..62c322c0b91 --- /dev/null +++ b/internal/metrics/benchmark_test.go @@ -0,0 +1,113 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package benchmark_test + +import ( + "testing" + + "github.com/prometheus/client_golang/prometheus" + "github.com/stretchr/testify/require" + promExporter "go.opentelemetry.io/otel/exporters/prometheus" + "go.opentelemetry.io/otel/sdk/metric" + + "github.com/jaegertracing/jaeger/internal/metrics/otelmetrics" + prom "github.com/jaegertracing/jaeger/internal/metrics/prometheus" + "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} + +func setupPrometheusFactory() metrics.Factory { + reg := prometheus.NewRegistry() + return prom.New(prom.WithRegisterer(reg)) +} + +func setupOTELFactory(b *testing.B) metrics.Factory { + registry := prometheus.NewRegistry() + exporter, err := promExporter.New(promExporter.WithRegisterer(registry)) + require.NoError(b, err) + meterProvider := metric.NewMeterProvider( + metric.WithReader(exporter), + ) + return otelmetrics.NewFactory(meterProvider) +} + +func benchmarkCounter(b *testing.B, factory metrics.Factory) { + counter := factory.Counter(metrics.Options{ + Name: "test_counter", + Tags: map[string]string{"tag1": "value1"}, + }) + + for i := 0; i < b.N; i++ { + counter.Inc(1) + } +} + +func benchmarkGauge(b *testing.B, factory metrics.Factory) { + gauge := factory.Gauge(metrics.Options{ + Name: "test_gauge", + Tags: map[string]string{"tag1": "value1"}, + }) + + for i := 0; i < b.N; i++ { + gauge.Update(1) + } +} + +func benchmarkTimer(b *testing.B, factory metrics.Factory) { + timer := factory.Timer(metrics.TimerOptions{ + Name: "test_timer", + Tags: map[string]string{"tag1": "value1"}, + }) + + for i := 0; i < b.N; i++ { + timer.Record(100) + } +} + +func benchmarkHistogram(b *testing.B, factory metrics.Factory) { + histogram := factory.Histogram(metrics.HistogramOptions{ + Name: "test_histogram", + Tags: map[string]string{"tag1": "value1"}, + }) + + for i := 0; i < b.N; i++ { + histogram.Record(1.0) + } +} + +func BenchmarkPrometheusCounter(b *testing.B) { + benchmarkCounter(b, setupPrometheusFactory()) +} + +func BenchmarkOTELCounter(b *testing.B) { + benchmarkCounter(b, setupOTELFactory(b)) +} + +func BenchmarkPrometheusGauge(b *testing.B) { + benchmarkGauge(b, setupPrometheusFactory()) +} + +func BenchmarkOTELGauge(b *testing.B) { + benchmarkGauge(b, setupOTELFactory(b)) +} + +func BenchmarkPrometheusTimer(b *testing.B) { + benchmarkTimer(b, setupPrometheusFactory()) +} + +func BenchmarkOTELTimer(b *testing.B) { + benchmarkTimer(b, setupOTELFactory(b)) +} + +func BenchmarkPrometheusHistogram(b *testing.B) { + benchmarkHistogram(b, setupPrometheusFactory()) +} + +func BenchmarkOTELHistogram(b *testing.B) { + benchmarkHistogram(b, setupOTELFactory(b)) +} diff --git a/internal/metrics/otelmetrics/counter.go b/internal/metrics/otelmetrics/counter.go new file mode 100644 index 00000000000..437442306f3 --- /dev/null +++ b/internal/metrics/otelmetrics/counter.go @@ -0,0 +1,20 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics + +import ( + "context" + + "go.opentelemetry.io/otel/metric" +) + +type otelCounter struct { + counter metric.Int64Counter + fixedCtx context.Context + option metric.AddOption +} + +func (c *otelCounter) Inc(value int64) { + c.counter.Add(c.fixedCtx, value, c.option) +} diff --git a/internal/metrics/otelmetrics/factory.go b/internal/metrics/otelmetrics/factory.go new file mode 100644 index 00000000000..d14e60c616c --- /dev/null +++ b/internal/metrics/otelmetrics/factory.go @@ -0,0 +1,133 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics + +import ( + "context" + "log" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + + "github.com/jaegertracing/jaeger/pkg/metrics" +) + +type otelFactory struct { + meter metric.Meter + scope string + separator string + normalizer *strings.Replacer + tags map[string]string +} + +func NewFactory(meterProvider metric.MeterProvider) metrics.Factory { + return &otelFactory{ + meter: meterProvider.Meter("jaeger-v2"), + separator: ".", + normalizer: strings.NewReplacer(" ", "_", ".", "_", "-", "_"), + tags: make(map[string]string), + } +} + +func (f *otelFactory) Counter(opts metrics.Options) metrics.Counter { + name := f.subScope(opts.Name) + counter, err := f.meter.Int64Counter(name) + if err != nil { + log.Printf("Error creating OTEL counter: %v", err) + return metrics.NullCounter + } + return &otelCounter{ + counter: counter, + fixedCtx: context.Background(), + option: attributeSetOption(f.mergeTags(opts.Tags)), + } +} + +func (f *otelFactory) Gauge(opts metrics.Options) metrics.Gauge { + name := f.subScope(opts.Name) + gauge, err := f.meter.Int64Gauge(name) + if err != nil { + log.Printf("Error creating OTEL gauge: %v", err) + return metrics.NullGauge + } + + return &otelGauge{ + gauge: gauge, + fixedCtx: context.Background(), + option: attributeSetOption(f.mergeTags(opts.Tags)), + } +} + +func (f *otelFactory) Histogram(opts metrics.HistogramOptions) metrics.Histogram { + name := f.subScope(opts.Name) + histogram, err := f.meter.Float64Histogram(name) + if err != nil { + log.Printf("Error creating OTEL histogram: %v", err) + return metrics.NullHistogram + } + + return &otelHistogram{ + histogram: histogram, + fixedCtx: context.Background(), + option: attributeSetOption(f.mergeTags(opts.Tags)), + } +} + +func (f *otelFactory) Timer(opts metrics.TimerOptions) metrics.Timer { + name := f.subScope(opts.Name) + timer, err := f.meter.Float64Histogram(name, metric.WithUnit("s")) + if err != nil { + log.Printf("Error creating OTEL timer: %v", err) + return metrics.NullTimer + } + return &otelTimer{ + histogram: timer, + fixedCtx: context.Background(), + option: attributeSetOption(f.mergeTags(opts.Tags)), + } +} + +func (f *otelFactory) Namespace(opts metrics.NSOptions) metrics.Factory { + return &otelFactory{ + meter: f.meter, + scope: f.subScope(opts.Name), + separator: f.separator, + normalizer: f.normalizer, + tags: f.mergeTags(opts.Tags), + } +} + +func (f *otelFactory) subScope(name string) string { + if f.scope == "" { + return f.normalize(name) + } + if name == "" { + return f.normalize(f.scope) + } + return f.normalize(f.scope + f.separator + name) +} + +func (f *otelFactory) normalize(v string) string { + return f.normalizer.Replace(v) +} + +func (f *otelFactory) mergeTags(tags map[string]string) map[string]string { + merged := make(map[string]string) + for k, v := range f.tags { + merged[k] = v + } + for k, v := range tags { + merged[k] = v + } + return merged +} + +func attributeSetOption(tags map[string]string) metric.MeasurementOption { + attributes := make([]attribute.KeyValue, 0, len(tags)) + for k, v := range tags { + attributes = append(attributes, attribute.String(k, v)) + } + return metric.WithAttributes(attributes...) +} diff --git a/internal/metrics/otelmetrics/factory_test.go b/internal/metrics/otelmetrics/factory_test.go new file mode 100644 index 00000000000..ade7cbf8064 --- /dev/null +++ b/internal/metrics/otelmetrics/factory_test.go @@ -0,0 +1,256 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics_test + +import ( + "testing" + "time" + + promReg "github.com/prometheus/client_golang/prometheus" + promModel "github.com/prometheus/client_model/go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/exporters/prometheus" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + + "github.com/jaegertracing/jaeger/internal/metrics/otelmetrics" + "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} + +func newTestFactory(t *testing.T, registry *promReg.Registry) metrics.Factory { + exporter, err := prometheus.New(prometheus.WithRegisterer(registry), prometheus.WithoutScopeInfo()) + require.NoError(t, err) + meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(exporter)) + return otelmetrics.NewFactory(meterProvider) +} + +func findMetric(t *testing.T, registry *promReg.Registry, name string) *promModel.MetricFamily { + metricFamilies, err := registry.Gather() + require.NoError(t, err) + + for _, mf := range metricFamilies { + t.Log(mf.GetName()) + if mf.GetName() == name { + return mf + } + } + require.Fail(t, "Expected to find Metric Family") + return nil +} + +func promLabelsToMap(labels []*promModel.LabelPair) map[string]string { + labelMap := make(map[string]string) + for _, label := range labels { + labelMap[label.GetName()] = label.GetValue() + } + return labelMap +} + +func TestInvalidCounter(t *testing.T) { + factory := newTestFactory(t, promReg.NewPedanticRegistry()) + counter := factory.Counter(metrics.Options{ + Name: "invalid*counter%", + }) + assert.Equal(t, counter, metrics.NullCounter, "Expected NullCounter, got %v", counter) +} + +func TestInvalidGauge(t *testing.T) { + factory := newTestFactory(t, promReg.NewPedanticRegistry()) + gauge := factory.Gauge(metrics.Options{ + Name: "#invalid>gauge%", + }) + assert.Equal(t, gauge, metrics.NullGauge, "Expected NullCounter, got %v", gauge) +} + +func TestInvalidHistogram(t *testing.T) { + factory := newTestFactory(t, promReg.NewPedanticRegistry()) + histogram := factory.Histogram(metrics.HistogramOptions{ + Name: "invalid>histogram?%", + }) + assert.Equal(t, histogram, metrics.NullHistogram, "Expected NullCounter, got %v", histogram) +} + +func TestInvalidTimer(t *testing.T) { + factory := newTestFactory(t, promReg.NewPedanticRegistry()) + timer := factory.Timer(metrics.TimerOptions{ + Name: "invalid*<=timer%", + }) + assert.Equal(t, timer, metrics.NullTimer, "Expected NullCounter, got %v", timer) +} + +func TestCounter(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + counter := factory.Counter(metrics.Options{ + Name: "test_counter", + Tags: map[string]string{"tag1": "value1"}, + }) + require.NotNil(t, counter) + counter.Inc(1) + counter.Inc(1) + + testCounter := findMetric(t, registry, "test_counter_total") + metrics := testCounter.GetMetric() + assert.Equal(t, float64(2), metrics[0].GetCounter().GetValue()) + expectedLabels := map[string]string{ + "tag1": "value1", + } + assert.Equal(t, expectedLabels, promLabelsToMap(metrics[0].GetLabel())) +} + +func TestGauge(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + gauge := factory.Gauge(metrics.Options{ + Name: "test_gauge", + Tags: map[string]string{"tag1": "value1"}, + }) + require.NotNil(t, gauge) + gauge.Update(2) + + testGauge := findMetric(t, registry, "test_gauge") + + metrics := testGauge.GetMetric() + assert.Equal(t, float64(2), metrics[0].GetGauge().GetValue()) + expectedLabels := map[string]string{ + "tag1": "value1", + } + assert.Equal(t, expectedLabels, promLabelsToMap(metrics[0].GetLabel())) +} + +func TestHistogram(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + histogram := factory.Histogram(metrics.HistogramOptions{ + Name: "test_histogram", + Tags: map[string]string{"tag1": "value1"}, + }) + require.NotNil(t, histogram) + histogram.Record(1.0) + + testHistogram := findMetric(t, registry, "test_histogram") + + metrics := testHistogram.GetMetric() + assert.Equal(t, float64(1), metrics[0].GetHistogram().GetSampleSum()) + expectedLabels := map[string]string{ + "tag1": "value1", + } + assert.Equal(t, expectedLabels, promLabelsToMap(metrics[0].GetLabel())) +} + +func TestTimer(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + timer := factory.Timer(metrics.TimerOptions{ + Name: "test_timer", + Tags: map[string]string{"tag1": "value1"}, + }) + require.NotNil(t, timer) + timer.Record(100 * time.Millisecond) + + testTimer := findMetric(t, registry, "test_timer_seconds") + + metrics := testTimer.GetMetric() + assert.Equal(t, float64(0.1), metrics[0].GetHistogram().GetSampleSum()) + expectedLabels := map[string]string{ + "tag1": "value1", + } + assert.Equal(t, expectedLabels, promLabelsToMap(metrics[0].GetLabel())) +} + +func TestNamespace(t *testing.T) { + testCases := []struct { + name string + nsOptions1 metrics.NSOptions + nsOptions2 metrics.NSOptions + expectedName string + expectedLabels map[string]string + }{ + { + name: "Nested Namespace", + nsOptions1: metrics.NSOptions{ + Name: "first_namespace", + Tags: map[string]string{"ns_tag1": "ns_value1"}, + }, + nsOptions2: metrics.NSOptions{ + Name: "second_namespace", + Tags: map[string]string{"ns_tag3": "ns_value3"}, + }, + expectedName: "first_namespace_second_namespace_test_counter_total", + expectedLabels: map[string]string{ + "ns_tag1": "ns_value1", + "ns_tag3": "ns_value3", + "tag1": "value1", + }, + }, + { + name: "Single Namespace", + nsOptions1: metrics.NSOptions{ + Name: "single_namespace", + Tags: map[string]string{"ns_tag2": "ns_value2"}, + }, + nsOptions2: metrics.NSOptions{}, + expectedName: "single_namespace_test_counter_total", + expectedLabels: map[string]string{ + "ns_tag2": "ns_value2", + "tag1": "value1", + }, + }, + { + name: "Empty Namespace Name", + nsOptions1: metrics.NSOptions{}, + nsOptions2: metrics.NSOptions{}, + expectedName: "test_counter_total", + expectedLabels: map[string]string{ + "tag1": "value1", + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + nsFactory1 := factory.Namespace(tc.nsOptions1) + nsFactory2 := nsFactory1.Namespace(tc.nsOptions2) + + counter := nsFactory2.Counter(metrics.Options{ + Name: "test_counter", + Tags: map[string]string{"tag1": "value1"}, + }) + require.NotNil(t, counter) + counter.Inc(1) + + testCounter := findMetric(t, registry, tc.expectedName) + + metrics := testCounter.GetMetric() + assert.Equal(t, float64(1), metrics[0].GetCounter().GetValue()) + assert.Equal(t, tc.expectedLabels, promLabelsToMap(metrics[0].GetLabel())) + }) + } +} + +func TestNormalization(t *testing.T) { + registry := promReg.NewPedanticRegistry() + factory := newTestFactory(t, registry) + normalizedFactory := factory.Namespace(metrics.NSOptions{ + Name: "My Namespace", + }) + + gauge := normalizedFactory.Gauge(metrics.Options{ + Name: "My Gauge", + }) + require.NotNil(t, gauge) + gauge.Update(1) + + testGauge := findMetric(t, registry, "My_Namespace_My_Gauge") + + metrics := testGauge.GetMetric() + assert.Equal(t, float64(1), metrics[0].GetGauge().GetValue()) +} diff --git a/internal/metrics/otelmetrics/gauge.go b/internal/metrics/otelmetrics/gauge.go new file mode 100644 index 00000000000..dc5c4f38428 --- /dev/null +++ b/internal/metrics/otelmetrics/gauge.go @@ -0,0 +1,20 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics + +import ( + "context" + + "go.opentelemetry.io/otel/metric" +) + +type otelGauge struct { + gauge metric.Int64Gauge + fixedCtx context.Context + option metric.RecordOption +} + +func (g *otelGauge) Update(value int64) { + g.gauge.Record(g.fixedCtx, value, g.option) +} diff --git a/internal/metrics/otelmetrics/histogram.go b/internal/metrics/otelmetrics/histogram.go new file mode 100644 index 00000000000..b408b47dd7c --- /dev/null +++ b/internal/metrics/otelmetrics/histogram.go @@ -0,0 +1,20 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics + +import ( + "context" + + "go.opentelemetry.io/otel/metric" +) + +type otelHistogram struct { + histogram metric.Float64Histogram + fixedCtx context.Context + option metric.RecordOption +} + +func (h *otelHistogram) Record(value float64) { + h.histogram.Record(h.fixedCtx, value, h.option) +} diff --git a/internal/metrics/otelmetrics/timer.go b/internal/metrics/otelmetrics/timer.go new file mode 100644 index 00000000000..0df689243b3 --- /dev/null +++ b/internal/metrics/otelmetrics/timer.go @@ -0,0 +1,21 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelmetrics + +import ( + "context" + "time" + + "go.opentelemetry.io/otel/metric" +) + +type otelTimer struct { + histogram metric.Float64Histogram + fixedCtx context.Context + option metric.RecordOption +} + +func (t *otelTimer) Record(d time.Duration) { + t.histogram.Record(t.fixedCtx, d.Seconds(), t.option) +} From f3a1998971c6e422a0f99e41f11755098a7f8900 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 30 Jun 2024 18:58:06 +0200 Subject: [PATCH 03/52] Use semver not hash for Kafka image (#5686) We don't need strict repeatable builds for integration tests, a semver is more appropriate and will prevent major/patch noise from renovate. --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- docker-compose/kafka/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/kafka/docker-compose.yml b/docker-compose/kafka/docker-compose.yml index 48d64a0c1f4..243ff1d3ed3 100644 --- a/docker-compose/kafka/docker-compose.yml +++ b/docker-compose/kafka/docker-compose.yml @@ -8,7 +8,7 @@ services: environment: - ALLOW_ANONYMOUS_LOGIN=yes kafka: - image: index.docker.io/bitnami/kafka@sha256:9abe5ce1ce14e0ff3041075c5183202fb5c47ea28ad270bfcb067f7ade304d8b # 3.7.0 + image: index.docker.io/bitnami/kafka@3.7.0 ports: - '9092:9092' environment: From 722755e2f6ee556e028002fc02b4753626000784 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 30 Jun 2024 19:11:23 +0200 Subject: [PATCH 04/52] [renovatebot] Disable 'digest' update types for integration test docker-compose files (#5689) Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 3fdb82d8bfc..b4913b64c9c 100644 --- a/renovate.json +++ b/renovate.json @@ -26,7 +26,7 @@ "docker-compose/opensearch/v2/docker-compose.yml", "plugin/storage/scylladb/docker-compose.yml" ], - "matchUpdateTypes": ["major", "patch"], + "matchUpdateTypes": ["major", "patch", "digest"], "enabled": false }, { From 9ba3238a2c23c032957eaf2691237021355effc8 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 30 Jun 2024 18:13:15 -0400 Subject: [PATCH 05/52] Simplify configs organization (#5690) ## Description of the changes - Move memstore config from pkg/memory to plugin/storage/memory, as the separation was unnecessary - Simplify imports in the extension ## How was this change tested? - CI Signed-off-by: Yuri Shkuro --- .../storageexporter/exporter_test.go | 4 +-- .../extension/jaegerstorage/config.go | 23 +++++++---------- .../extension/jaegerstorage/extension.go | 5 ++-- .../extension/jaegerstorage/extension_test.go | 14 +++++------ pkg/memory/config/empty_test.go | 25 ------------------- plugin/storage/grpc/factory.go | 2 ++ .../storage/memory}/config.go | 2 +- plugin/storage/memory/factory.go | 3 +-- plugin/storage/memory/factory_test.go | 3 +-- plugin/storage/memory/memory.go | 13 +++++----- plugin/storage/memory/memory_test.go | 3 +-- plugin/storage/memory/options.go | 4 +-- 12 files changed, 33 insertions(+), 68 deletions(-) delete mode 100644 pkg/memory/config/empty_test.go rename {pkg/memory/config => plugin/storage/memory}/config.go (98%) diff --git a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go index 1b5d0ca7b3e..3c4d412130f 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go +++ b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go @@ -33,7 +33,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" "github.com/jaegertracing/jaeger/model" - memoryCfg "github.com/jaegertracing/jaeger/pkg/memory/config" + "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" factoryMocks "github.com/jaegertracing/jaeger/storage/mocks" ) @@ -166,7 +166,7 @@ func makeStorageExtension(t *testing.T, memstoreName string) component.Host { TracerProvider: nooptrace.NewTracerProvider(), }, }, - &jaegerstorage.Config{Memory: map[string]memoryCfg.Configuration{ + &jaegerstorage.Config{Memory: map[string]memory.Configuration{ memstoreName: {MaxTraces: 10000}, }}) require.NoError(t, err) diff --git a/cmd/jaeger/internal/extension/jaegerstorage/config.go b/cmd/jaeger/internal/extension/jaegerstorage/config.go index 88b43f9f56a..1d65d5fd172 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/config.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/config.go @@ -8,30 +8,25 @@ import ( "reflect" esCfg "github.com/jaegertracing/jaeger/pkg/es/config" - memoryCfg "github.com/jaegertracing/jaeger/pkg/memory/config" - badgerCfg "github.com/jaegertracing/jaeger/plugin/storage/badger" + "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" - grpcCfg "github.com/jaegertracing/jaeger/plugin/storage/grpc" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" + "github.com/jaegertracing/jaeger/plugin/storage/memory" ) // Config has the configuration for jaeger-query, type Config struct { - Memory map[string]memoryCfg.Configuration `mapstructure:"memory"` - Badger map[string]badgerCfg.NamespaceConfig `mapstructure:"badger"` - GRPC map[string]grpcCfg.ConfigV2 `mapstructure:"grpc"` - Opensearch map[string]esCfg.Configuration `mapstructure:"opensearch"` - Elasticsearch map[string]esCfg.Configuration `mapstructure:"elasticsearch"` - Cassandra map[string]cassandra.Options `mapstructure:"cassandra"` + Memory map[string]memory.Configuration `mapstructure:"memory"` + Badger map[string]badger.NamespaceConfig `mapstructure:"badger"` + GRPC map[string]grpc.ConfigV2 `mapstructure:"grpc"` + Opensearch map[string]esCfg.Configuration `mapstructure:"opensearch"` + Elasticsearch map[string]esCfg.Configuration `mapstructure:"elasticsearch"` + Cassandra map[string]cassandra.Options `mapstructure:"cassandra"` // TODO add other storage types here // TODO how will this work with 3rd party storage implementations? // Option: instead of looking for specific name, check interface. } -type MemoryStorage struct { - Name string `mapstructure:"name"` - memoryCfg.Configuration -} - func (cfg *Config) Validate() error { emptyCfg := createDefaultConfig().(*Config) if reflect.DeepEqual(*cfg, *emptyCfg) { diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension.go b/cmd/jaeger/internal/extension/jaegerstorage/extension.go index 9b5d11fcac1..c2fad1ade9f 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension.go @@ -15,7 +15,6 @@ import ( "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter" esCfg "github.com/jaegertracing/jaeger/pkg/es/config" - memoryCfg "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" @@ -107,13 +106,13 @@ func (s *starter[Config, Factory]) build(_ context.Context, _ component.Host) er } func (s *storageExt) Start(ctx context.Context, host component.Host) error { - memStarter := &starter[memoryCfg.Configuration, *memory.Factory]{ + memStarter := &starter[memory.Configuration, *memory.Factory]{ ext: s, storageKind: "memory", cfg: s.config.Memory, // memory factory does not return an error, so need to wrap it builder: func( - cfg memoryCfg.Configuration, + cfg memory.Configuration, metricsFactory metrics.Factory, logger *zap.Logger, ) (*memory.Factory, error) { diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go index 399358dbd7a..bd893078f24 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go @@ -19,10 +19,10 @@ import ( "go.uber.org/zap" esCfg "github.com/jaegertracing/jaeger/pkg/es/config" - memoryCfg "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/pkg/testutils" - badgerCfg "github.com/jaegertracing/jaeger/plugin/storage/badger" + "github.com/jaegertracing/jaeger/plugin/storage/badger" + "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage/spanstore" @@ -80,10 +80,10 @@ func TestStorageExtensionConfigError(t *testing.T) { func TestStorageExtensionNameConflict(t *testing.T) { storageExtension := makeStorageExtenion(t, &Config{ - Memory: map[string]memoryCfg.Configuration{ + Memory: map[string]memory.Configuration{ "foo": {MaxTraces: 10000}, }, - Badger: map[string]badgerCfg.NamespaceConfig{ + Badger: map[string]badger.NamespaceConfig{ "foo": {}, }, }) @@ -134,7 +134,7 @@ func TestStorageExtension(t *testing.T) { func TestBadgerStorageExtension(t *testing.T) { storageExtension := makeStorageExtenion(t, &Config{ - Badger: map[string]badgerCfg.NamespaceConfig{ + Badger: map[string]badger.NamespaceConfig{ "foo": { Ephemeral: true, MaintenanceInterval: 5, @@ -150,7 +150,7 @@ func TestBadgerStorageExtension(t *testing.T) { func TestBadgerStorageExtensionError(t *testing.T) { ext := makeStorageExtenion(t, &Config{ - Badger: map[string]badgerCfg.NamespaceConfig{ + Badger: map[string]badger.NamespaceConfig{ "foo": { KeyDirectory: "/bad/path", ValueDirectory: "/bad/path", @@ -229,7 +229,7 @@ func makeStorageExtenion(t *testing.T, config *Config) component.Component { func startStorageExtension(t *testing.T, memstoreName string) component.Component { config := &Config{ - Memory: map[string]memoryCfg.Configuration{ + Memory: map[string]memory.Configuration{ memstoreName: {MaxTraces: 10000}, }, } diff --git a/pkg/memory/config/empty_test.go b/pkg/memory/config/empty_test.go deleted file mode 100644 index 6557ace0cb9..00000000000 --- a/pkg/memory/config/empty_test.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2019 The Jaeger Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "testing" - - "github.com/jaegertracing/jaeger/pkg/testutils" -) - -func TestMain(m *testing.M) { - testutils.VerifyGoLeaks(m) -} diff --git a/plugin/storage/grpc/factory.go b/plugin/storage/grpc/factory.go index 0d8958cc2d3..5f630cffa57 100644 --- a/plugin/storage/grpc/factory.go +++ b/plugin/storage/grpc/factory.go @@ -45,6 +45,8 @@ type Factory struct { logger *zap.Logger tracerProvider trace.TracerProvider + // configV1 is used for backward compatibility. it will be removed in v2. + // In the main initialization logic, only configV2 is used. configV1 Configuration configV2 *ConfigV2 diff --git a/pkg/memory/config/config.go b/plugin/storage/memory/config.go similarity index 98% rename from pkg/memory/config/config.go rename to plugin/storage/memory/config.go index 0fb59c36359..864ad7bec31 100644 --- a/pkg/memory/config/config.go +++ b/plugin/storage/memory/config.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package config +package memory // Configuration describes the options to customize the storage behavior type Configuration struct { diff --git a/plugin/storage/memory/factory.go b/plugin/storage/memory/factory.go index 2c9fe0b5fda..6c677b03d95 100644 --- a/plugin/storage/memory/factory.go +++ b/plugin/storage/memory/factory.go @@ -23,7 +23,6 @@ import ( "github.com/jaegertracing/jaeger/internal/safeexpvar" "github.com/jaegertracing/jaeger/pkg/distributedlock" - "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/plugin" "github.com/jaegertracing/jaeger/storage" @@ -54,7 +53,7 @@ func NewFactory() *Factory { // NewFactoryWithConfig is used from jaeger(v2). func NewFactoryWithConfig( - cfg config.Configuration, + cfg Configuration, metricsFactory metrics.Factory, logger *zap.Logger, ) *Factory { diff --git a/plugin/storage/memory/factory_test.go b/plugin/storage/memory/factory_test.go index 5c43799b704..47c0664c5bf 100644 --- a/plugin/storage/memory/factory_test.go +++ b/plugin/storage/memory/factory_test.go @@ -24,7 +24,6 @@ import ( "go.uber.org/zap" "github.com/jaegertracing/jaeger/pkg/config" - memCfg "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/storage" ) @@ -61,7 +60,7 @@ func TestWithConfiguration(t *testing.T) { } func TestNewFactoryWithConfig(t *testing.T) { - cfg := memCfg.Configuration{ + cfg := Configuration{ MaxTraces: 42, } f := NewFactoryWithConfig(cfg, metrics.NullFactory, zap.NewNop()) diff --git a/plugin/storage/memory/memory.go b/plugin/storage/memory/memory.go index e7c8c3fb0a0..f92ae9949e9 100644 --- a/plugin/storage/memory/memory.go +++ b/plugin/storage/memory/memory.go @@ -26,7 +26,6 @@ import ( "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/model/adjuster" - "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -36,7 +35,7 @@ type Store struct { sync.RWMutex // Each tenant gets a copy of default config. // In the future this can be extended to contain per-tenant configuration. - defaultConfig config.Configuration + defaultConfig Configuration perTenant map[string]*Tenant } @@ -48,24 +47,24 @@ type Tenant struct { services map[string]struct{} operations map[string]map[spanstore.Operation]struct{} deduper adjuster.Adjuster - config config.Configuration + config Configuration index int } // NewStore creates an unbounded in-memory store func NewStore() *Store { - return WithConfiguration(config.Configuration{MaxTraces: 0}) + return WithConfiguration(Configuration{MaxTraces: 0}) } // WithConfiguration creates a new in memory storage based on the given configuration -func WithConfiguration(configuration config.Configuration) *Store { +func WithConfiguration(cfg Configuration) *Store { return &Store{ - defaultConfig: configuration, + defaultConfig: cfg, perTenant: make(map[string]*Tenant), } } -func newTenant(cfg config.Configuration) *Tenant { +func newTenant(cfg Configuration) *Tenant { return &Tenant{ ids: make([]*model.TraceID, cfg.MaxTraces), traces: map[model.TraceID]*model.Trace{}, diff --git a/plugin/storage/memory/memory_test.go b/plugin/storage/memory/memory_test.go index a1bc0500909..72e62a2c980 100644 --- a/plugin/storage/memory/memory_test.go +++ b/plugin/storage/memory/memory_test.go @@ -24,7 +24,6 @@ import ( "github.com/stretchr/testify/require" "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/pkg/memory/config" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -170,7 +169,7 @@ func TestStoreWriteSpan(t *testing.T) { func TestStoreWithLimit(t *testing.T) { maxTraces := 100 - store := WithConfiguration(config.Configuration{MaxTraces: maxTraces}) + store := WithConfiguration(Configuration{MaxTraces: maxTraces}) for i := 0; i < maxTraces*2; i++ { id := model.NewTraceID(1, uint64(i)) diff --git a/plugin/storage/memory/options.go b/plugin/storage/memory/options.go index d2ec03d21b4..efbdbb05ffa 100644 --- a/plugin/storage/memory/options.go +++ b/plugin/storage/memory/options.go @@ -18,15 +18,13 @@ import ( "flag" "github.com/spf13/viper" - - "github.com/jaegertracing/jaeger/pkg/memory/config" ) const limit = "memory.max-traces" // Options stores the configuration entries for this storage type Options struct { - Configuration config.Configuration `mapstructure:",squash"` + Configuration Configuration `mapstructure:",squash"` } // AddFlags from this storage to the CLI From d6827e3f9d02f71a2e5f282fb52a0d61931a22d2 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Mon, 1 Jul 2024 01:55:20 -0400 Subject: [PATCH 06/52] Support default configs for storage backends (#5691) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Which problem is this PR solving? - Many OTEL Collector components provide default configs such that users do not need to provide most settings. - However, due to our organization of the storage extension config, there was no way to provide defaults ## Description of the changes - πŸ›‘ **breaking** Change the main config inside out: instead of static separation by storage types followed by a map of custom names, move the map to the top level followed by static separation by storage type. E.g. ```yaml # before memory: some_storage: max_traces: 100000 # after backends: some_storage: memory: max_traces: 100000 ``` - This required an introduction of an extra nesting via `backends`, which is a bit unfortunate, but the OTEL framework requires config to be a struct, it did not work with a map at the top level. Having a struct might actually be beneficial in the future if we need some top-level settings - Add custom marshaling code where if a specific storage type is detected as set-by-user, then a default is created first (similar mechanism to how extension default configs is created by OTEL Collector, but unfortunately that mechanism is rigid, non-recursive) - Change sample config files to the new format - Use names `some_store` and `another_store` in configs to emphasize that those are custom names, not part of the config struct - Add more unit tests for config ## How was this change tested? - Unit tests and CI ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Yuri Shkuro --- cmd/jaeger/config-badger.yaml | 32 ++-- cmd/jaeger/config-cassandra.yaml | 32 +--- cmd/jaeger/config-elasticsearch.yaml | 26 +-- cmd/jaeger/config-opensearch.yaml | 26 +-- cmd/jaeger/config-remote-storage.yaml | 16 +- cmd/jaeger/internal/all-in-one.yaml | 11 +- .../storageexporter/exporter_test.go | 21 ++- .../extension/jaegerstorage/config.go | 90 +++++++-- .../extension/jaegerstorage/config_test.go | 109 +++++++++++ .../extension/jaegerstorage/extension.go | 112 +++-------- .../extension/jaegerstorage/extension_test.go | 176 ++++++++++-------- pkg/cassandra/config/config.go | 12 ++ plugin/storage/badger/options.go | 27 +-- plugin/storage/cassandra/factory.go | 2 +- plugin/storage/cassandra/factory_test.go | 4 +- plugin/storage/cassandra/options.go | 33 ++-- plugin/storage/es/factory.go | 2 +- plugin/storage/es/options.go | 4 +- plugin/storage/grpc/config.go | 8 + plugin/storage/grpc/config_test.go | 6 + 20 files changed, 439 insertions(+), 310 deletions(-) create mode 100644 cmd/jaeger/internal/extension/jaegerstorage/config_test.go diff --git a/cmd/jaeger/config-badger.yaml b/cmd/jaeger/config-badger.yaml index 4643c9cc75a..e919cd4411b 100644 --- a/cmd/jaeger/config-badger.yaml +++ b/cmd/jaeger/config-badger.yaml @@ -8,26 +8,22 @@ service: extensions: jaeger_query: - trace_storage: badger_main - trace_storage_archive: badger_archive + trace_storage: some_store + trace_storage_archive: another_store ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - badger: - badger_main: - directory_key: "/tmp/jaeger/" - directory_value: "/tmp/jaeger/" - ephemeral: false - maintenance_interval: 5 - metrics_update_interval: 10 - span_store_ttl: 72h - badger_archive: - directory_key: "/tmp/jaeger_archive/" - directory_value: "/tmp/jaeger_archive/" - ephemeral: false - maintenance_interval: 5 - metrics_update_interval: 10 - span_store_ttl: 720h + backends: + some_store: + badger: + directory_key: "/tmp/jaeger/" + directory_value: "/tmp/jaeger/" + ephemeral: false + another_store: + badger: + directory_key: "/tmp/jaeger_archive/" + directory_value: "/tmp/jaeger_archive/" + ephemeral: false receivers: otlp: @@ -40,4 +36,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: badger_main + trace_storage: some_store diff --git a/cmd/jaeger/config-cassandra.yaml b/cmd/jaeger/config-cassandra.yaml index 39cfb319489..e72ae33f411 100644 --- a/cmd/jaeger/config-cassandra.yaml +++ b/cmd/jaeger/config-cassandra.yaml @@ -8,30 +8,18 @@ service: extensions: jaeger_query: - trace_storage: cassandra_main - trace_storage_archive: cassandra_archive + trace_storage: some_storage + trace_storage_archive: another_storage ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - cassandra: - cassandra_main: - servers: 127.0.0.1 - port: 9042 - keyspace: "jaeger_v1_dc1" - connections_per_host: 2 - index: - tags: true - logs: true - process_tags: true - cassandra_archive: - servers: 127.0.0.1 - port: 9042 - keyspace: "jaeger_v1_dc1" - connections_per_host: 2 - index: - tags: true - logs: true - process_tags: true + backends: + some_storage: + cassandra: + keyspace: "jaeger_v1_dc1" + another_storage: + cassandra: + keyspace: "jaeger_v1_dc1" receivers: otlp: protocols: @@ -50,4 +38,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: cassandra_main + trace_storage: some_storage diff --git a/cmd/jaeger/config-elasticsearch.yaml b/cmd/jaeger/config-elasticsearch.yaml index 21257f920d6..917357ccce9 100644 --- a/cmd/jaeger/config-elasticsearch.yaml +++ b/cmd/jaeger/config-elasticsearch.yaml @@ -8,24 +8,18 @@ service: extensions: jaeger_query: - trace_storage: es_main - trace_storage_archive: es_archive + trace_storage: some_storage + trace_storage_archive: another_storage ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - elasticsearch: - es_main: - server_urls: http://localhost:9200 - log_level: "error" - index_prefix: "jaeger-main" - use_aliases: false - create_mappings: true - es_archive: - server_urls: http://localhost:9200 - log_level: "error" - index_prefix: "jaeger-archive" - use_aliases: false - create_mappings: true + backends: + some_storage: + elasticsearch: + index_prefix: "jaeger-main" + another_storage: + elasticsearch: + index_prefix: "jaeger-archive" receivers: otlp: @@ -38,4 +32,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: es_main + trace_storage: some_storage diff --git a/cmd/jaeger/config-opensearch.yaml b/cmd/jaeger/config-opensearch.yaml index c7acf7d8f53..14973700aa9 100644 --- a/cmd/jaeger/config-opensearch.yaml +++ b/cmd/jaeger/config-opensearch.yaml @@ -8,25 +8,19 @@ service: extensions: jaeger_query: - trace_storage: os_main - trace_storage_archive: os_archive + trace_storage: some_storage + trace_storage_archive: another_storage ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - opensearch: - os_main: - server_urls: http://localhost:9200 - log_level: "error" - index_prefix: "jaeger-main" - use_aliases: false - create_mappings: true + backends: + some_storage: + opensearch: + index_prefix: "jaeger-main" - os_archive: - server_urls: http://localhost:9200 - log_level: "error" - index_prefix: "jaeger-main" - use_aliases: false - create_mappings: true + another_storage: + opensearch: + index_prefix: "jaeger-main" receivers: otlp: @@ -39,4 +33,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: os_main + trace_storage: some_storage diff --git a/cmd/jaeger/config-remote-storage.yaml b/cmd/jaeger/config-remote-storage.yaml index 98a438bd779..a5e1b1528e1 100644 --- a/cmd/jaeger/config-remote-storage.yaml +++ b/cmd/jaeger/config-remote-storage.yaml @@ -8,16 +8,16 @@ service: extensions: jaeger_query: - trace_storage: external-storage + trace_storage: some-storage ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - grpc: - external-storage: - endpoint: localhost:17271 - timeout: 5s - tls: - insecure: true + backends: + some-storage: + grpc: + endpoint: localhost:17271 + tls: + insecure: true receivers: otlp: @@ -30,4 +30,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: external-storage + trace_storage: some-storage diff --git a/cmd/jaeger/internal/all-in-one.yaml b/cmd/jaeger/internal/all-in-one.yaml index d17c52fc850..2e99217191f 100644 --- a/cmd/jaeger/internal/all-in-one.yaml +++ b/cmd/jaeger/internal/all-in-one.yaml @@ -8,12 +8,13 @@ service: extensions: jaeger_query: - trace_storage: memstore + trace_storage: some_storage jaeger_storage: - memory: - memstore: - max_traces: 100000 + backends: + some_storage: + memory: + max_traces: 100000 receivers: otlp: @@ -35,4 +36,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: memstore + trace_storage: some_storage diff --git a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go index 3c4d412130f..3693b8ef1fe 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go +++ b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go @@ -29,7 +29,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" noopmetric "go.opentelemetry.io/otel/metric/noop" nooptrace "go.opentelemetry.io/otel/trace/noop" - "go.uber.org/zap" + "go.uber.org/zap/zaptest" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" "github.com/jaegertracing/jaeger/model" @@ -103,7 +103,7 @@ func TestExporter(t *testing.T) { ctx := context.Background() telemetrySettings := component.TelemetrySettings{ - Logger: zap.L(), + Logger: zaptest.NewLogger(t), TracerProvider: nooptrace.NewTracerProvider(), MeterProvider: noopmetric.NewMeterProvider(), } @@ -157,18 +157,21 @@ func TestExporter(t *testing.T) { } func makeStorageExtension(t *testing.T, memstoreName string) component.Host { + telemetrySettings := component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), + } extensionFactory := jaegerstorage.NewFactory() storageExtension, err := extensionFactory.CreateExtension( context.Background(), extension.Settings{ - TelemetrySettings: component.TelemetrySettings{ - Logger: zap.L(), - TracerProvider: nooptrace.NewTracerProvider(), - }, + TelemetrySettings: telemetrySettings, }, - &jaegerstorage.Config{Memory: map[string]memory.Configuration{ - memstoreName: {MaxTraces: 10000}, - }}) + &jaegerstorage.Config{Backends: map[string]jaegerstorage.Backend{ + memstoreName: {Memory: &memory.Configuration{MaxTraces: 10000}}, + }}, + ) require.NoError(t, err) host := storagetest.NewStorageHost() diff --git a/cmd/jaeger/internal/extension/jaegerstorage/config.go b/cmd/jaeger/internal/extension/jaegerstorage/config.go index 1d65d5fd172..42d4630d29d 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/config.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/config.go @@ -6,31 +6,95 @@ package jaegerstorage import ( "fmt" "reflect" + "time" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" + + casCfg "github.com/jaegertracing/jaeger/pkg/cassandra/config" esCfg "github.com/jaegertracing/jaeger/pkg/es/config" "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" + "github.com/jaegertracing/jaeger/plugin/storage/es" "github.com/jaegertracing/jaeger/plugin/storage/grpc" "github.com/jaegertracing/jaeger/plugin/storage/memory" ) -// Config has the configuration for jaeger-query, +var ( + _ component.ConfigValidator = (*Config)(nil) + _ confmap.Unmarshaler = (*Backend)(nil) +) + +// Config contains configuration(s) for jaeger trace storage. +// Keys in the map are storage names that can be used to refer to them +// from other components, e.g. from jaeger_storage_exporter or jaeger_query. +// We tried to alias this type directly to a map, but conf did not populated it correctly. +// Note also that the Backend struct has a custom unmarshaler. type Config struct { - Memory map[string]memory.Configuration `mapstructure:"memory"` - Badger map[string]badger.NamespaceConfig `mapstructure:"badger"` - GRPC map[string]grpc.ConfigV2 `mapstructure:"grpc"` - Opensearch map[string]esCfg.Configuration `mapstructure:"opensearch"` - Elasticsearch map[string]esCfg.Configuration `mapstructure:"elasticsearch"` - Cassandra map[string]cassandra.Options `mapstructure:"cassandra"` - // TODO add other storage types here - // TODO how will this work with 3rd party storage implementations? - // Option: instead of looking for specific name, check interface. + Backends map[string]Backend `mapstructure:"backends"` +} + +type Backend struct { + Memory *memory.Configuration `mapstructure:"memory"` + Badger *badger.NamespaceConfig `mapstructure:"badger"` + GRPC *grpc.ConfigV2 `mapstructure:"grpc"` + Cassandra *cassandra.Options `mapstructure:"cassandra"` + Elasticsearch *esCfg.Configuration `mapstructure:"elasticsearch"` + Opensearch *esCfg.Configuration `mapstructure:"opensearch"` +} + +// Unmarshal implements confmap.Unmarshaler. This allows us to provide +// defaults for different configs. It cannot be done in createDefaultConfig() +// because at that time we don't know which backends the user wants to use. +func (cfg *Backend) Unmarshal(conf *confmap.Conf) error { + // apply defaults + if conf.IsSet("memory") { + cfg.Memory = &memory.Configuration{ + MaxTraces: 1_000_000, + } + } + if conf.IsSet("badger") { + v := badger.DefaultNamespaceConfig() + cfg.Badger = &v + } + if conf.IsSet("grpc") { + v := grpc.DefaultConfigV2() + cfg.GRPC = &v + } + if conf.IsSet("cassandra") { + cfg.Cassandra = &cassandra.Options{ + Primary: cassandra.NamespaceConfig{ + Configuration: casCfg.DefaultConfiguration(), + Enabled: true, + }, + SpanStoreWriteCacheTTL: 12 * time.Hour, + Index: cassandra.IndexConfig{ + Tags: true, + ProcessTags: true, + Logs: true, + }, + } + } + if conf.IsSet("elasticsearch") { + v := es.DefaultConfig() + cfg.Elasticsearch = &v + } + if conf.IsSet("opensearch") { + v := es.DefaultConfig() + cfg.Opensearch = &v + } + return conf.Unmarshal(cfg) } func (cfg *Config) Validate() error { - emptyCfg := createDefaultConfig().(*Config) - if reflect.DeepEqual(*cfg, *emptyCfg) { - return fmt.Errorf("%s: no storage type present in config", ID) + if len(cfg.Backends) == 0 { + return fmt.Errorf("at least one storage is required") + } + for name, b := range cfg.Backends { + empty := Backend{} + if reflect.DeepEqual(b, empty) { + return fmt.Errorf("no backend defined for storage '%s'", name) + } } return nil } diff --git a/cmd/jaeger/internal/extension/jaegerstorage/config_test.go b/cmd/jaeger/internal/extension/jaegerstorage/config_test.go new file mode 100644 index 00000000000..3f4dd8cd74b --- /dev/null +++ b/cmd/jaeger/internal/extension/jaegerstorage/config_test.go @@ -0,0 +1,109 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package jaegerstorage + +import ( + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func loadConf(t *testing.T, config string) *confmap.Conf { + d := t.TempDir() + f := filepath.Join(d, "config.yaml") + require.NoError(t, os.WriteFile(f, []byte(config), 0o644)) + cm, err := confmaptest.LoadConf(f) + require.NoError(t, err) + return cm +} + +func TestConfigValidateNoBackends(t *testing.T) { + conf := loadConf(t, ` +backends: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + require.EqualError(t, cfg.Validate(), "at least one storage is required") +} + +func TestConfigValidateEmptyBackend(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + require.EqualError(t, cfg.Validate(), "no backend defined for storage 'some_storage'") +} + +func TestConfigDefaultMemory(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + memory: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].Memory.MaxTraces) +} + +func TestConfigDefaultBadger(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + badger: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].Badger.SpanStoreTTL) +} + +func TestConfigDefaultGRPC(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + grpc: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].GRPC.Timeout) +} + +func TestConfigDefaultCassandra(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + cassandra: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].Cassandra.Primary.Servers) +} + +func TestConfigDefaultElasticsearch(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + elasticsearch: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].Elasticsearch.Servers) +} + +func TestConfigDefaultOpensearch(t *testing.T) { + conf := loadConf(t, ` +backends: + some_storage: + opensearch: +`) + cfg := createDefaultConfig().(*Config) + require.NoError(t, conf.Unmarshal(cfg)) + assert.NotEmpty(t, cfg.Backends["some_storage"].Opensearch.Servers) +} diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension.go b/cmd/jaeger/internal/extension/jaegerstorage/extension.go index c2fad1ade9f..9ca2dba178d 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension.go @@ -11,11 +11,9 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" - "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter" - esCfg "github.com/jaegertracing/jaeger/pkg/es/config" - "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/internal/metrics/otelmetrics" "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" "github.com/jaegertracing/jaeger/plugin/storage/es" @@ -34,7 +32,7 @@ type Extension interface { type storageExt struct { config *Config - logger *zap.Logger + telset component.TelemetrySettings factories map[string]storage.Factory } @@ -72,97 +70,39 @@ func GetStorageFactoryV2(name string, host component.Host) (spanstore.Factory, e return factoryadapter.NewFactory(f), nil } -func newStorageExt(config *Config, otel component.TelemetrySettings) *storageExt { +func newStorageExt(config *Config, telset component.TelemetrySettings) *storageExt { return &storageExt{ config: config, - logger: otel.Logger, + telset: telset, factories: make(map[string]storage.Factory), } } -type starter[Config any, Factory storage.Factory] struct { - ext *storageExt - storageKind string - cfg map[string]Config - builder func(Config, metrics.Factory, *zap.Logger) (Factory, error) -} - -func (s *starter[Config, Factory]) build(_ context.Context, _ component.Host) error { - for name, cfg := range s.cfg { - if _, ok := s.ext.factories[name]; ok { - return fmt.Errorf("duplicate %s storage name %s", s.storageKind, name) +func (s *storageExt) Start(_ context.Context, _ component.Host) error { + mf := otelmetrics.NewFactory(s.telset.MeterProvider) + for storageName, cfg := range s.config.Backends { + s.telset.Logger.Sugar().Infof("Initializing storage '%s'", storageName) + var factory storage.Factory + var err error = errors.New("empty configuration") + switch { + case cfg.Memory != nil: + factory, err = memory.NewFactoryWithConfig(*cfg.Memory, mf, s.telset.Logger), nil + case cfg.Badger != nil: + factory, err = badger.NewFactoryWithConfig(*cfg.Badger, mf, s.telset.Logger) + case cfg.GRPC != nil: + //nolint: contextcheck + factory, err = grpc.NewFactoryWithConfig(*cfg.GRPC, mf, s.telset.Logger) + case cfg.Cassandra != nil: + factory, err = cassandra.NewFactoryWithConfig(*cfg.Cassandra, mf, s.telset.Logger) + case cfg.Elasticsearch != nil: + factory, err = es.NewFactoryWithConfig(*cfg.Elasticsearch, mf, s.telset.Logger) + case cfg.Opensearch != nil: + factory, err = es.NewFactoryWithConfig(*cfg.Opensearch, mf, s.telset.Logger) } - factory, err := s.builder( - cfg, - metrics.NullFactory, - s.ext.logger.With(zap.String("storage_name", name)), - ) if err != nil { - return fmt.Errorf("failed to initialize %s storage %s: %w", s.storageKind, name, err) - } - s.ext.factories[name] = factory - } - return nil -} - -func (s *storageExt) Start(ctx context.Context, host component.Host) error { - memStarter := &starter[memory.Configuration, *memory.Factory]{ - ext: s, - storageKind: "memory", - cfg: s.config.Memory, - // memory factory does not return an error, so need to wrap it - builder: func( - cfg memory.Configuration, - metricsFactory metrics.Factory, - logger *zap.Logger, - ) (*memory.Factory, error) { - return memory.NewFactoryWithConfig(cfg, metricsFactory, logger), nil - }, - } - badgerStarter := &starter[badger.NamespaceConfig, *badger.Factory]{ - ext: s, - storageKind: "badger", - cfg: s.config.Badger, - builder: badger.NewFactoryWithConfig, - } - grpcStarter := &starter[grpc.ConfigV2, *grpc.Factory]{ - ext: s, - storageKind: "grpc", - cfg: s.config.GRPC, - builder: grpc.NewFactoryWithConfig, - } - esStarter := &starter[esCfg.Configuration, *es.Factory]{ - ext: s, - storageKind: "elasticsearch", - cfg: s.config.Elasticsearch, - builder: es.NewFactoryWithConfig, - } - osStarter := &starter[esCfg.Configuration, *es.Factory]{ - ext: s, - storageKind: "opensearch", - cfg: s.config.Opensearch, - builder: es.NewFactoryWithConfig, - } - cassandraStarter := &starter[cassandra.Options, *cassandra.Factory]{ - ext: s, - storageKind: "cassandra", - cfg: s.config.Cassandra, - builder: cassandra.NewFactoryWithConfig, - } - - builders := []func(ctx context.Context, host component.Host) error{ - memStarter.build, - badgerStarter.build, - grpcStarter.build, - esStarter.build, - osStarter.build, - cassandraStarter.build, - // TODO add support for other backends - } - for _, builder := range builders { - if err := builder(ctx, host); err != nil { - return err + return fmt.Errorf("failed to initialize storage '%s': %w", storageName, err) } + s.factories[storageName] = factory } return nil } diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go index bd893078f24..4d42ff4289f 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go @@ -5,6 +5,7 @@ package jaegerstorage import ( "context" + "encoding/json" "fmt" "net/http" "net/http/httptest" @@ -13,6 +14,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/extension" noopmetric "go.opentelemetry.io/otel/metric/noop" nooptrace "go.opentelemetry.io/otel/trace/noop" @@ -20,8 +22,9 @@ import ( esCfg "github.com/jaegertracing/jaeger/pkg/es/config" "github.com/jaegertracing/jaeger/pkg/metrics" - "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/badger" + "github.com/jaegertracing/jaeger/plugin/storage/cassandra" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" "github.com/jaegertracing/jaeger/storage/dependencystore" @@ -29,13 +32,13 @@ import ( ) type storageHost struct { - t *testing.T - storageExtension component.Component + t *testing.T + ext component.Component } func (host storageHost) GetExtensions() map[component.ID]component.Component { return map[component.ID]component.Component{ - ID: host.storageExtension, + ID: host.ext, } } @@ -72,57 +75,37 @@ func (e errorFactory) Close() error { return e.closeErr } -func TestStorageExtensionConfigError(t *testing.T) { - config := createDefaultConfig().(*Config) - err := config.Validate() - require.ErrorContains(t, err, "no storage type present in config") -} - -func TestStorageExtensionNameConflict(t *testing.T) { - storageExtension := makeStorageExtenion(t, &Config{ - Memory: map[string]memory.Configuration{ - "foo": {MaxTraces: 10000}, - }, - Badger: map[string]badger.NamespaceConfig{ - "foo": {}, - }, - }) - err := storageExtension.Start(context.Background(), componenttest.NewNopHost()) - require.ErrorContains(t, err, "duplicate") -} - func TestStorageFactoryBadHostError(t *testing.T) { - host := componenttest.NewNopHost() - _, err := GetStorageFactory("something", host) + _, err := GetStorageFactory("something", componenttest.NewNopHost()) require.ErrorContains(t, err, "cannot find extension") } func TestStorageFactoryBadNameError(t *testing.T) { - host := storageHost{t: t, storageExtension: startStorageExtension(t, "foo")} + host := storageHost{t: t, ext: startStorageExtension(t, "foo")} _, err := GetStorageFactory("bar", host) require.ErrorContains(t, err, "cannot find storage 'bar'") } func TestStorageFactoryBadShutdownError(t *testing.T) { shutdownError := fmt.Errorf("shutdown error") - storageExtension := storageExt{ + ext := storageExt{ factories: map[string]storage.Factory{ "foo": errorFactory{closeErr: shutdownError}, }, } - err := storageExtension.Shutdown(context.Background()) + err := ext.Shutdown(context.Background()) require.ErrorIs(t, err, shutdownError) } -func TestStorageFactoryV2Error(t *testing.T) { +func TestGetFactoryV2Error(t *testing.T) { host := componenttest.NewNopHost() _, err := GetStorageFactoryV2("something", host) require.ErrorContains(t, err, "cannot find extension") } -func TestStorageExtension(t *testing.T) { +func TestGetFactory(t *testing.T) { const name = "foo" - host := storageHost{t: t, storageExtension: startStorageExtension(t, name)} + host := storageHost{t: t, ext: startStorageExtension(t, name)} f, err := GetStorageFactory(name, host) require.NoError(t, err) require.NotNil(t, f) @@ -132,76 +115,107 @@ func TestStorageExtension(t *testing.T) { require.NotNil(t, f2) } -func TestBadgerStorageExtension(t *testing.T) { - storageExtension := makeStorageExtenion(t, &Config{ - Badger: map[string]badger.NamespaceConfig{ +func TestBadger(t *testing.T) { + ext := makeStorageExtenion(t, &Config{ + Backends: map[string]Backend{ "foo": { - Ephemeral: true, - MaintenanceInterval: 5, - MetricsUpdateInterval: 10, + Badger: &badger.NamespaceConfig{ + Ephemeral: true, + MaintenanceInterval: 5, + MetricsUpdateInterval: 10, + }, }, }, }) ctx := context.Background() - err := storageExtension.Start(ctx, componenttest.NewNopHost()) + err := ext.Start(ctx, componenttest.NewNopHost()) require.NoError(t, err) - require.NoError(t, storageExtension.Shutdown(ctx)) + require.NoError(t, ext.Shutdown(ctx)) } -func TestBadgerStorageExtensionError(t *testing.T) { +func TestGRPC(t *testing.T) { ext := makeStorageExtenion(t, &Config{ - Badger: map[string]badger.NamespaceConfig{ + Backends: map[string]Backend{ "foo": { - KeyDirectory: "/bad/path", - ValueDirectory: "/bad/path", + GRPC: &grpc.ConfigV2{ + ClientConfig: configgrpc.ClientConfig{ + Endpoint: "localhost:12345", + }, + }, }, }, }) + ctx := context.Background() + err := ext.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + require.NoError(t, ext.Shutdown(ctx)) +} + +func TestStartError(t *testing.T) { + ext := makeStorageExtenion(t, &Config{ + Backends: map[string]Backend{ + "foo": {}, + }, + }) err := ext.Start(context.Background(), componenttest.NewNopHost()) - require.ErrorContains(t, err, "failed to initialize badger storage") - require.ErrorContains(t, err, "/bad/path") + require.ErrorContains(t, err, "failed to initialize storage 'foo'") + require.ErrorContains(t, err, "empty configuration") } -func TestESStorageExtension(t *testing.T) { - mockEsServerResponse := []byte(` - { - "Version": { - "Number": "6" - } - } - `) +func testElasticsearchOrOpensearch(t *testing.T, cfg Backend) { + ext := makeStorageExtenion(t, &Config{ + Backends: map[string]Backend{ + "foo": cfg, + }, + }) + ctx := context.Background() + err := ext.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + require.NoError(t, ext.Shutdown(ctx)) +} + +func TestXYZsearch(t *testing.T) { + versionResponse, err := json.Marshal(map[string]any{ + "Version": map[string]any{ + "Number": "7", + }, + }) + require.NoError(t, err) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - w.Write(mockEsServerResponse) + w.Write(versionResponse) })) defer server.Close() - storageExtension := makeStorageExtenion(t, &Config{ - Elasticsearch: map[string]esCfg.Configuration{ - "foo": { + t.Run("Elasticsearch", func(t *testing.T) { + testElasticsearchOrOpensearch(t, Backend{ + Elasticsearch: &esCfg.Configuration{ Servers: []string{server.URL}, LogLevel: "error", }, - }, + }) + }) + t.Run("OpenSearch", func(t *testing.T) { + testElasticsearchOrOpensearch(t, Backend{ + Opensearch: &esCfg.Configuration{ + Servers: []string{server.URL}, + LogLevel: "error", + }, + }) }) - ctx := context.Background() - err := storageExtension.Start(ctx, componenttest.NewNopHost()) - require.NoError(t, err) - require.NoError(t, storageExtension.Shutdown(ctx)) } -func TestESStorageExtensionError(t *testing.T) { - defer testutils.VerifyGoLeaksOnce(t) - +func TestCassandraError(t *testing.T) { + // since we cannot successfully create storage factory for Cassandra + // without running a Cassandra server, we only test the error case. ext := makeStorageExtenion(t, &Config{ - Elasticsearch: map[string]esCfg.Configuration{ - "foo": { - Servers: []string{"http://127.0.0.1:65535"}, - LogLevel: "error", + Backends: map[string]Backend{ + "cassandra": { + Cassandra: &cassandra.Options{}, }, }, }) err := ext.Start(context.Background(), componenttest.NewNopHost()) - require.ErrorContains(t, err, "failed to initialize elasticsearch storage") - require.ErrorContains(t, err, "http://127.0.0.1:65535") + require.ErrorContains(t, err, "failed to initialize storage 'cassandra'") + require.ErrorContains(t, err, "Servers: non zero value required") } func noopTelemetrySettings() component.TelemetrySettings { @@ -215,7 +229,7 @@ func noopTelemetrySettings() component.TelemetrySettings { func makeStorageExtenion(t *testing.T, config *Config) component.Component { extensionFactory := NewFactory() ctx := context.Background() - storageExtension, err := extensionFactory.CreateExtension(ctx, + ext, err := extensionFactory.CreateExtension(ctx, extension.Settings{ ID: ID, TelemetrySettings: noopTelemetrySettings(), @@ -224,22 +238,26 @@ func makeStorageExtenion(t *testing.T, config *Config) component.Component { config, ) require.NoError(t, err) - return storageExtension + return ext } func startStorageExtension(t *testing.T, memstoreName string) component.Component { config := &Config{ - Memory: map[string]memory.Configuration{ - memstoreName: {MaxTraces: 10000}, + Backends: map[string]Backend{ + memstoreName: { + Memory: &memory.Configuration{ + MaxTraces: 10000, + }, + }, }, } require.NoError(t, config.Validate()) - storageExtension := makeStorageExtenion(t, config) - err := storageExtension.Start(context.Background(), componenttest.NewNopHost()) + ext := makeStorageExtenion(t, config) + err := ext.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) t.Cleanup(func() { - require.NoError(t, storageExtension.Shutdown(context.Background())) + require.NoError(t, ext.Shutdown(context.Background())) }) - return storageExtension + return ext } diff --git a/pkg/cassandra/config/config.go b/pkg/cassandra/config/config.go index 5b383851ea5..54b69931441 100644 --- a/pkg/cassandra/config/config.go +++ b/pkg/cassandra/config/config.go @@ -48,6 +48,18 @@ type Configuration struct { TLS tlscfg.Options `mapstructure:"tls"` } +func DefaultConfiguration() Configuration { + return Configuration{ + Servers: []string{"127.0.0.1"}, + Port: 9042, + MaxRetryAttempts: 3, + Keyspace: "jaeger_v1_test", + ProtoVersion: 4, + ConnectionsPerHost: 2, + ReconnectInterval: 60 * time.Second, + } +} + // Authenticator holds the authentication properties needed to connect to a Cassandra cluster type Authenticator struct { Basic BasicAuthenticator `yaml:"basic" mapstructure:",squash"` diff --git a/plugin/storage/badger/options.go b/plugin/storage/badger/options.go index f756cf421eb..34d71eccab0 100644 --- a/plugin/storage/badger/options.go +++ b/plugin/storage/badger/options.go @@ -64,21 +64,26 @@ const ( defaultKeysDir = defaultDataDir + string(os.PathSeparator) + "keys" ) +func DefaultNamespaceConfig() NamespaceConfig { + defaultBadgerDataDir := getCurrentExecutableDir() + return NamespaceConfig{ + SpanStoreTTL: defaultTTL, + SyncWrites: false, // Performance over durability + Ephemeral: true, // Default is ephemeral storage + ValueDirectory: defaultBadgerDataDir + defaultValueDir, + KeyDirectory: defaultBadgerDataDir + defaultKeysDir, + MaintenanceInterval: defaultMaintenanceInterval, + MetricsUpdateInterval: defaultMetricsUpdateInterval, + } +} + // NewOptions creates a new Options struct. func NewOptions(primaryNamespace string, _ ...string /* otherNamespaces */) *Options { - defaultBadgerDataDir := getCurrentExecutableDir() + defaultConfig := DefaultNamespaceConfig() + defaultConfig.namespace = primaryNamespace options := &Options{ - Primary: NamespaceConfig{ - namespace: primaryNamespace, - SpanStoreTTL: defaultTTL, - SyncWrites: false, // Performance over durability - Ephemeral: true, // Default is ephemeral storage - ValueDirectory: defaultBadgerDataDir + defaultValueDir, - KeyDirectory: defaultBadgerDataDir + defaultKeysDir, - MaintenanceInterval: defaultMaintenanceInterval, - MetricsUpdateInterval: defaultMetricsUpdateInterval, - }, + Primary: defaultConfig, } return options diff --git a/plugin/storage/cassandra/factory.go b/plugin/storage/cassandra/factory.go index a3bcc895f95..6df3e3663d0 100644 --- a/plugin/storage/cassandra/factory.go +++ b/plugin/storage/cassandra/factory.go @@ -134,7 +134,7 @@ func (f *Factory) configureFromOptions(o *Options) { f.Options = o // TODO this is a hack because we do not define defaults in Options if o.others == nil { - o.others = make(map[string]*namespaceConfig) + o.others = make(map[string]*NamespaceConfig) } f.primaryConfig = o.GetPrimary() if cfg := f.Options.Get(archiveStorageConfig); cfg != nil { diff --git a/plugin/storage/cassandra/factory_test.go b/plugin/storage/cassandra/factory_test.go index 448a23eead9..97c6b6471a9 100644 --- a/plugin/storage/cassandra/factory_test.go +++ b/plugin/storage/cassandra/factory_test.go @@ -204,7 +204,7 @@ func TestConfigureFromOptions(t *testing.T) { func TestNewFactoryWithConfig(t *testing.T) { t.Run("valid configuration", func(t *testing.T) { opts := &Options{ - Primary: namespaceConfig{ + Primary: NamespaceConfig{ Configuration: cassandraCfg.Configuration{ Servers: []string{"localhost:9200"}, }, @@ -224,7 +224,7 @@ func TestNewFactoryWithConfig(t *testing.T) { t.Run("connection error", func(t *testing.T) { expErr := errors.New("made-up error") opts := &Options{ - Primary: namespaceConfig{ + Primary: NamespaceConfig{ Configuration: cassandraCfg.Configuration{ Servers: []string{"localhost:9200"}, }, diff --git a/plugin/storage/cassandra/options.go b/plugin/storage/cassandra/options.go index a0a6718ddb2..996efb853e9 100644 --- a/plugin/storage/cassandra/options.go +++ b/plugin/storage/cassandra/options.go @@ -53,16 +53,14 @@ const ( suffixIndexLogs = ".index.logs" suffixIndexTags = ".index.tags" suffixIndexProcessTags = ".index.process-tags" - - defaultHost = "127.0.0.1" ) // Options contains various type of Cassandra configs and provides the ability // to bind them to command line flag and apply overlays, so that some configurations // (e.g. archive) may be underspecified and infer the rest of its parameters from primary. type Options struct { - Primary namespaceConfig `mapstructure:",squash"` - others map[string]*namespaceConfig + Primary NamespaceConfig `mapstructure:",squash"` + others map[string]*NamespaceConfig SpanStoreWriteCacheTTL time.Duration `mapstructure:"span_store_write_cache_ttl"` Index IndexConfig `mapstructure:"index"` } @@ -80,7 +78,7 @@ type IndexConfig struct { // the Servers field in config.Configuration is a list, which we cannot represent with flags. // This struct adds a plain string field that can be bound to flags and is then parsed when // preparing the actual config.Configuration. -type namespaceConfig struct { +type NamespaceConfig struct { config.Configuration `mapstructure:",squash"` namespace string Enabled bool `mapstructure:"-"` @@ -90,24 +88,17 @@ type namespaceConfig struct { func NewOptions(primaryNamespace string, otherNamespaces ...string) *Options { // TODO all default values should be defined via cobra flags options := &Options{ - Primary: namespaceConfig{ - Configuration: config.Configuration{ - MaxRetryAttempts: 3, - Keyspace: "jaeger_v1_test", - ProtoVersion: 4, - ConnectionsPerHost: 2, - ReconnectInterval: 60 * time.Second, - Servers: []string{defaultHost}, - }, - namespace: primaryNamespace, - Enabled: true, + Primary: NamespaceConfig{ + Configuration: config.DefaultConfiguration(), + namespace: primaryNamespace, + Enabled: true, }, - others: make(map[string]*namespaceConfig, len(otherNamespaces)), + others: make(map[string]*NamespaceConfig, len(otherNamespaces)), SpanStoreWriteCacheTTL: time.Hour * 12, } for _, namespace := range otherNamespaces { - options.others[namespace] = &namespaceConfig{namespace: namespace} + options.others[namespace] = &NamespaceConfig{namespace: namespace} } return options @@ -144,7 +135,7 @@ func (opt *Options) AddFlags(flagSet *flag.FlagSet) { "Controls process tag indexing. Set to false to disable.") } -func addFlags(flagSet *flag.FlagSet, nsConfig namespaceConfig) { +func addFlags(flagSet *flag.FlagSet, nsConfig NamespaceConfig) { tlsFlagsConfig := tlsFlagsConfig(nsConfig.namespace) tlsFlagsConfig.AddFlags(flagSet) @@ -243,7 +234,7 @@ func tlsFlagsConfig(namespace string) tlscfg.ClientFlagsConfig { } } -func (cfg *namespaceConfig) initFromViper(v *viper.Viper) { +func (cfg *NamespaceConfig) initFromViper(v *viper.Viper) { tlsFlagsConfig := tlsFlagsConfig(cfg.namespace) if cfg.namespace != primaryStorageConfig { cfg.Enabled = v.GetBool(cfg.namespace + suffixEnabled) @@ -283,7 +274,7 @@ func (opt *Options) GetPrimary() *config.Configuration { func (opt *Options) Get(namespace string) *config.Configuration { nsCfg, ok := opt.others[namespace] if !ok { - nsCfg = &namespaceConfig{} + nsCfg = &NamespaceConfig{} opt.others[namespace] = nsCfg } if !nsCfg.Enabled { diff --git a/plugin/storage/es/factory.go b/plugin/storage/es/factory.go index 267254d260d..d9c7f624e8d 100644 --- a/plugin/storage/es/factory.go +++ b/plugin/storage/es/factory.go @@ -96,7 +96,7 @@ func NewFactoryWithConfig( return nil, err } - defaultConfig := getDefaultConfig() + defaultConfig := DefaultConfig() cfg.ApplyDefaults(&defaultConfig) archive := make(map[string]*namespaceConfig) diff --git a/plugin/storage/es/options.go b/plugin/storage/es/options.go index 7661aa2b476..ecce3059d46 100644 --- a/plugin/storage/es/options.go +++ b/plugin/storage/es/options.go @@ -99,7 +99,7 @@ type namespaceConfig struct { // NewOptions creates a new Options struct. func NewOptions(primaryNamespace string, otherNamespaces ...string) *Options { // TODO all default values should be defined via cobra flags - defaultConfig := getDefaultConfig() + defaultConfig := DefaultConfig() options := &Options{ Primary: namespaceConfig{ Configuration: defaultConfig, @@ -408,7 +408,7 @@ func initDateLayout(rolloverFreq, sep string) string { return indexLayout } -func getDefaultConfig() config.Configuration { +func DefaultConfig() config.Configuration { return config.Configuration{ Username: "", Password: "", diff --git a/plugin/storage/grpc/config.go b/plugin/storage/grpc/config.go index 907cd1a13f9..e8fa5704f3c 100644 --- a/plugin/storage/grpc/config.go +++ b/plugin/storage/grpc/config.go @@ -47,6 +47,14 @@ type ConfigV2 struct { exporterhelper.TimeoutSettings `mapstructure:",squash"` } +func DefaultConfigV2() ConfigV2 { + return ConfigV2{ + TimeoutSettings: exporterhelper.TimeoutSettings{ + Timeout: defaultConnectionTimeout, + }, + } +} + func (c *Configuration) TranslateToConfigV2() *ConfigV2 { return &ConfigV2{ ClientConfig: configgrpc.ClientConfig{ diff --git a/plugin/storage/grpc/config_test.go b/plugin/storage/grpc/config_test.go index 26a7d778627..b994c9a53f5 100644 --- a/plugin/storage/grpc/config_test.go +++ b/plugin/storage/grpc/config_test.go @@ -7,6 +7,7 @@ import ( "errors" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "google.golang.org/grpc" @@ -22,3 +23,8 @@ func TestBuildRemoteNewClientError(t *testing.T) { require.Error(t, err) require.Contains(t, err.Error(), "error creating remote storage client") } + +func TestDefaultConfigV2(t *testing.T) { + cfg := DefaultConfigV2() + assert.NotEmpty(t, cfg.Timeout) +} From 6e1fe0b3e28876f229958f39f3cc43aa5d2c1f18 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 2 Jul 2024 01:49:27 +0200 Subject: [PATCH 07/52] Update All OTEL Collector packages (#5692) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/component](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configauth](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configgrpc](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/confighttp](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configtls](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigtls/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigtls/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigtls/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigtls/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/converter/expandconverter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/envprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/fileprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/httpprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/httpsprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/yamlprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/connector](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/connector/forwardconnector](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/consumer](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/debugexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension/ballastextension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension/zpagesextension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/otelcol](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/pdata](https://togithub.com/open-telemetry/opentelemetry-collector) | `v1.10.0` -> `v1.11.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fpdata/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fpdata/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fpdata/v1.10.0/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fpdata/v1.10.0/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor/batchprocessor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor/memorylimiterprocessor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/component) ### [`v0.104.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1110v01040) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.103.0...v0.104.0) This release includes 2 very important breaking changes. 1. The `otlpreceiver` will now use `localhost` by default instead of `0.0.0.0`. This may break the receiver in containerized environments like Kubernetes. If you depend on `0.0.0.0` disable the `component.UseLocalHostAsDefaultHost` feature gate or explicitly set the endpoint to `0.0.0.0`. 2. Expansion of BASH-style environment variables, such as `$FOO` will no longer be supported by default. If you depend on this syntax, disable the `confmap.unifyEnvVarExpansion` feature gate, but know that the feature will be removed in the future in favor of `${env:FOO}`. ##### πŸ›‘ Breaking changes πŸ›‘ - `filter`: Remove deprecated `filter.CombinedFilter` ([#​10348](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10348)) - `otelcol`: By default, `otelcol.NewCommand` and `otelcol.NewCommandMustSetProvider` will set the `DefaultScheme` to `env`. ([#​10435](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10435)) - `expandconverter`: By default expandconverter will now error if it is about to expand `$FOO` syntax. Update configuration to use `${env:FOO}` instead or disable the `confmap.unifyEnvVarExpansion` feature gate. ([#​10435](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10435)) - `otlpreceiver`: Switch to `localhost` as the default for all endpoints. ([#​8510](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8510)) Disable the `component.UseLocalHostAsDefaultHost` feature gate to temporarily get the previous default. ##### πŸ’‘ Enhancements πŸ’‘ - `confighttp`: Add support for cookies in HTTP clients with `cookies::enabled`. ([#​10175](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10175)) The method `confighttp.ToClient` will return a client with a `cookiejar.Jar` which will reuse cookies from server responses in subsequent requests. - `exporter/debug`: In `normal` verbosity, display one line of text for each telemetry record (log, data point, span) ([#​7806](https://togithub.com/open-telemetry/opentelemetry-collector/issues/7806)) - `exporter/debug`: Add option `use_internal_logger` ([#​10226](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10226)) - `configretry`: Mark module as stable. ([#​10279](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10279)) - `debugexporter`: Print Span.TraceState() when present. ([#​10421](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10421)) Enables viewing sampling threshold information (as by OTEP 235 samplers). - `processorhelper`: Add "inserted" metrics for processors. ([#​10353](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10353)) This includes the following metrics for processors: - `processor_inserted_spans` - `processor_inserted_metric_points` - `processor_inserted_log_records` ##### 🧰 Bug fixes 🧰 - `otlpexporter`: Update validation to support both dns:// and dns:/// ([#​10449](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10449)) - `service`: Fixed a bug that caused otel-collector to fail to start with ipv6 metrics endpoint service telemetry. ([#​10011](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10011))
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ‘» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- cmd/jaeger/internal/command.go | 3 +- go.mod | 86 ++++++++--------- go.sum | 170 +++++++++++++++++---------------- 3 files changed, 130 insertions(+), 129 deletions(-) diff --git a/cmd/jaeger/internal/command.go b/cmd/jaeger/internal/command.go index c6e84d3ccc9..135211eb131 100644 --- a/cmd/jaeger/internal/command.go +++ b/cmd/jaeger/internal/command.go @@ -52,8 +52,7 @@ func Command() *cobra.Command { }, }, } - - cmd := otelcol.NewCommandMustSetProvider(settings) + cmd := otelcol.NewCommand(settings) // We want to support running the binary in all-in-one mode without a config file. // Since there are no explicit hooks in OTel Collector for that today (as of v0.87), diff --git a/go.mod b/go.mod index ad372ada143..118a7dd5650 100644 --- a/go.mod +++ b/go.mod @@ -39,34 +39,34 @@ require ( github.com/stretchr/testify v1.9.0 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/xdg-go/scram v1.1.2 - go.opentelemetry.io/collector/component v0.103.0 - go.opentelemetry.io/collector/config/configgrpc v0.103.0 - go.opentelemetry.io/collector/config/confighttp v0.103.0 - go.opentelemetry.io/collector/config/configretry v0.103.0 - go.opentelemetry.io/collector/config/configtls v0.103.0 - go.opentelemetry.io/collector/confmap v0.103.0 - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.103.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.103.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0 - go.opentelemetry.io/collector/connector v0.103.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.103.0 - go.opentelemetry.io/collector/consumer v0.103.0 - go.opentelemetry.io/collector/exporter v0.103.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.103.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.103.0 - go.opentelemetry.io/collector/extension v0.103.0 - go.opentelemetry.io/collector/extension/ballastextension v0.103.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.103.0 - go.opentelemetry.io/collector/otelcol v0.103.0 - go.opentelemetry.io/collector/pdata v1.10.0 - go.opentelemetry.io/collector/processor v0.103.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.103.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.103.0 - go.opentelemetry.io/collector/receiver v0.103.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0 + go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/config/configgrpc v0.104.0 + go.opentelemetry.io/collector/config/confighttp v0.104.0 + go.opentelemetry.io/collector/config/configretry v1.11.0 + go.opentelemetry.io/collector/config/configtls v0.104.0 + go.opentelemetry.io/collector/confmap v0.104.0 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0 + go.opentelemetry.io/collector/connector v0.104.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.104.0 + go.opentelemetry.io/collector/consumer v0.104.0 + go.opentelemetry.io/collector/exporter v0.104.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 + go.opentelemetry.io/collector/extension v0.104.0 + go.opentelemetry.io/collector/extension/ballastextension v0.104.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.104.0 + go.opentelemetry.io/collector/otelcol v0.104.0 + go.opentelemetry.io/collector/pdata v1.11.0 + go.opentelemetry.io/collector/processor v0.104.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.104.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0 + go.opentelemetry.io/collector/receiver v0.104.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 go.opentelemetry.io/otel v1.27.0 @@ -130,7 +130,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.1.1 // indirect @@ -186,27 +186,27 @@ require ( github.com/xdg-go/stringprep v1.0.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.103.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.103.0 - go.opentelemetry.io/collector/config/configcompression v1.10.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.103.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.10.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.103.0 // indirect - go.opentelemetry.io/collector/config/internal v0.103.0 // indirect - go.opentelemetry.io/collector/exporter/debugexporter v0.103.0 - go.opentelemetry.io/collector/extension/auth v0.103.0 // indirect - go.opentelemetry.io/collector/featuregate v1.10.0 // indirect - go.opentelemetry.io/collector/semconv v0.103.0 // indirect - go.opentelemetry.io/collector/service v0.103.0 // indirect + go.opentelemetry.io/collector v0.104.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.104.0 + go.opentelemetry.io/collector/config/configcompression v1.11.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.104.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.11.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect + go.opentelemetry.io/collector/config/internal v0.104.0 // indirect + go.opentelemetry.io/collector/exporter/debugexporter v0.104.0 + go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect + go.opentelemetry.io/collector/featuregate v1.11.0 // indirect + go.opentelemetry.io/collector/semconv v0.104.0 // indirect + go.opentelemetry.io/collector/service v0.104.0 // indirect go.opentelemetry.io/contrib/config v0.7.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect go.opentelemetry.io/contrib/zpages v0.52.0 // indirect go.opentelemetry.io/otel/bridge/opencensus v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.27.0 go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/go.sum b/go.sum index 553703b8505..a61659230c0 100644 --- a/go.sum +++ b/go.sum @@ -198,8 +198,8 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= @@ -397,88 +397,90 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.103.0 h1:mssWo1y31p1F/SRsSBnVUX6YocgawCqM1blpE+hkWog= -go.opentelemetry.io/collector v0.103.0/go.mod h1:mgqdTFB7QCYiOeEdJSSEktovPqy+2fw4oTKJzyeSB0U= -go.opentelemetry.io/collector/component v0.103.0 h1:j52YAsp8EmqYUotVUwhovkqFZGuxArEkk65V4TI46NE= -go.opentelemetry.io/collector/component v0.103.0/go.mod h1:jKs19tGtCO8Hr5/YM0F+PoFcl8SVe/p4Ge30R6srkbc= -go.opentelemetry.io/collector/config/configauth v0.103.0 h1:tv2Ilj0X9T8ZsDd4mB8Sl+nXQ8CG8MJVQ1Lo4mmE0Pk= -go.opentelemetry.io/collector/config/configauth v0.103.0/go.mod h1:VIo8DpFeyOOCMUVoQsBdq3t2snUiBBECP0UxW1bwz/o= -go.opentelemetry.io/collector/config/configcompression v1.10.0 h1:ClkAY1rzaxFawmC53BUf3TjTWKOGx+2xnpqOJIkg6Tk= -go.opentelemetry.io/collector/config/configcompression v1.10.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= -go.opentelemetry.io/collector/config/configgrpc v0.103.0 h1:H1TXxUwxaZINmAzuehP/8ExKhJKzuw/oBGc7juzwloo= -go.opentelemetry.io/collector/config/configgrpc v0.103.0/go.mod h1:1FG873Wpw9AWANjXBvOd59noWY3dZoU6WkMWLJDx5FQ= -go.opentelemetry.io/collector/config/confighttp v0.103.0 h1:tgCWMKuIorSr4+iQOv0A8Ya/8do73hiG5KHinWaz63Q= -go.opentelemetry.io/collector/config/confighttp v0.103.0/go.mod h1:xMXoLsTGTJlftu+VAL3iadEs4gkmqFrvuPPnpNi6ETo= -go.opentelemetry.io/collector/config/confignet v0.103.0 h1:A2/8y2oEFaJbmtl+r1JIP0y+281vmmcPp0P51xcSn5s= -go.opentelemetry.io/collector/config/confignet v0.103.0/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= -go.opentelemetry.io/collector/config/configopaque v1.10.0 h1:FAxj6ggLpJE/kFnR1ezYwjRdo6gHo2+CjlIsHVCFVnQ= -go.opentelemetry.io/collector/config/configopaque v1.10.0/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= -go.opentelemetry.io/collector/config/configretry v0.103.0 h1:AwWGdeYJvUCZfh127Jb8uj7kuoPrJ3t2iZGwQUxmb7c= -go.opentelemetry.io/collector/config/configretry v0.103.0/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= -go.opentelemetry.io/collector/config/configtelemetry v0.103.0 h1:KLbhkFqdw9D31t0IhJ/rnhMRvz/s14eie0fKfm5xWns= -go.opentelemetry.io/collector/config/configtelemetry v0.103.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/config/configtls v0.103.0 h1:nbk8sJIHoYYQbpZtUkUQceTbjC4wEjoePKJ15v8cCcU= -go.opentelemetry.io/collector/config/configtls v0.103.0/go.mod h1:046dfdfHW8wWCMhzUaWJo7guRiCoSz5QzVjCSDzymdU= -go.opentelemetry.io/collector/config/internal v0.103.0 h1:pimS3uLHfOBbConZrviGoTwu+bkTNDoQBtbeWCg8U8k= -go.opentelemetry.io/collector/config/internal v0.103.0/go.mod h1:kJRkB+PgamWqPi/GWbYWvnRzVzS1rwDUh6+VSz4C7NQ= -go.opentelemetry.io/collector/confmap v0.103.0 h1:qKKZyWzropSKfgtGv12JzADOXNgThqH1Vx6qzblBE24= -go.opentelemetry.io/collector/confmap v0.103.0/go.mod h1:TlOmqe/Km3K6WgxyhEAdCb/V1Yp6eSU76fCoiluEa88= -go.opentelemetry.io/collector/confmap/converter/expandconverter v0.103.0 h1:zApcKLSosuu9I/4IRHTqlE1H6XNiZNAgd26YbzHwkto= -go.opentelemetry.io/collector/confmap/converter/expandconverter v0.103.0/go.mod h1:hoel+3CPjRhPSHzCrE1E+wCyoSLHlgW7662Ntwx2ujM= -go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0 h1:0XHQ/ffxSUx3sMbnYSf8a4jnVYLUrxo+/XwdhXkizgs= -go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0/go.mod h1:NiE4Fe42Sew1TyXuU1YEd0xZBDNI+w6IRkC2OTlJUak= -go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0 h1:5dB2G7d6RKmWS8ptuAWvAEKGYODk2DTRm84bU9HooLQ= -go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0/go.mod h1:GT/GBk17lDhc27762w6PNHvKYbA+TnHvNEyQHUsjKpY= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.103.0 h1:Hrp+nw4W9/jeJfi3GfJW6EYh7DeNkaC1wojOh4x8CbI= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.103.0/go.mod h1:kUst0pGVBlKDSlvJYDclrsApbkMv7ahRDh6/pE4LsBc= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0 h1:JUDRYsMOhkIBxZqZli0BU+64zahIUgnEPZSe9wo2T0Q= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0/go.mod h1:+mUrWjpdGIdSKMeeplLO+qXFSBc287as2oIPVdKMTxc= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0 h1:boTv+ZRkn1h5eUbt5sLSU5lCrItCCxCen/laRmsHLyg= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0/go.mod h1:0pZ7RD7SPg+yklgGPN+74Zzbps4R9x5bRPZX1D1gtGM= -go.opentelemetry.io/collector/connector v0.103.0 h1:jwmrgCT6ftz3U4o8mAqP+/yaQ5KsLMFXo2+OHXhy+tE= -go.opentelemetry.io/collector/connector v0.103.0/go.mod h1:6RDaeDMiXTKEXSy1eIaO0EiM+/91NVHdBxOc9e2++2A= -go.opentelemetry.io/collector/connector/forwardconnector v0.103.0 h1:r4+BxddgTpkvFXEDsh9jL5Qg+wqlkwgHwDUfYux8QTM= -go.opentelemetry.io/collector/connector/forwardconnector v0.103.0/go.mod h1:1dp/eyK6GtdUlSeYQseJGdb9KyprDfBQbBRTOzYuGY8= -go.opentelemetry.io/collector/consumer v0.103.0 h1:L/7SA/U2ua5L4yTLChnI9I+IFGKYU5ufNQ76QKYcPYs= -go.opentelemetry.io/collector/consumer v0.103.0/go.mod h1:7jdYb9kSSOsu2R618VRX0VJ+Jt3OrDvvUsDToHTEOLI= -go.opentelemetry.io/collector/exporter v0.103.0 h1:g0nF/FAwuA7tTJf5uo1PvlQl7xFqCgvfH+FYqufBSiw= -go.opentelemetry.io/collector/exporter v0.103.0/go.mod h1:PC2OvciPEew2kaA/ZMyxRqfeOW8Wgi0CYR614PEyS/w= -go.opentelemetry.io/collector/exporter/debugexporter v0.103.0 h1:jwZHoXvp3vdQ3obtnU+Vav5ChTCUBSC6mvlOZJ8doCU= -go.opentelemetry.io/collector/exporter/debugexporter v0.103.0/go.mod h1:kzmBnKxsLNVBRGS8nwu497SvHspzyeiV06+LiPHktto= -go.opentelemetry.io/collector/exporter/otlpexporter v0.103.0 h1:YKdYP3tDOQC6sOdOD1/Sun6CA4Zwpky+aRve3dx5QcE= -go.opentelemetry.io/collector/exporter/otlpexporter v0.103.0/go.mod h1:4UVHkqgL80CRVrbD85p2k4swDe27gLyQkoKlSYOkR0A= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.103.0 h1:26jP07GOjipKnFAKw0hDnCTB67tXZzHN+uxii3mnbjw= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.103.0/go.mod h1:qJGL48tf0CamMLUjO+HtxDeDZ+4pvvxxF1GDqE5VHnc= -go.opentelemetry.io/collector/extension v0.103.0 h1:vTsd+GElvT7qKk9Y9d6UKuuT2Ngx0mai8Q48hkKQMwM= -go.opentelemetry.io/collector/extension v0.103.0/go.mod h1:rp2l3xskNKWv0yBCyU69Pv34TnP1QVD1ijr0zSndnsM= -go.opentelemetry.io/collector/extension/auth v0.103.0 h1:i7cQl+Ewpve/DIN4rFMg1GiyUPE14LZsYWrJ1RqtP84= -go.opentelemetry.io/collector/extension/auth v0.103.0/go.mod h1:JdYBS/EkPAz2APAi8g7xTiSRlZTc7c4H82AQM9epzxw= -go.opentelemetry.io/collector/extension/ballastextension v0.103.0 h1:U8f6b6xnkD04HNIOgqLAWXfCcezSAU2vMq5SMtKjjbo= -go.opentelemetry.io/collector/extension/ballastextension v0.103.0/go.mod h1:/B3xE2YhUgGXSsFH8Qg0kq4WpfkuTyWDJGNyfRgMax8= -go.opentelemetry.io/collector/extension/zpagesextension v0.103.0 h1:jgSEQY++zOI6hFQygwuvS6ulJ/Yu4xXgUg+Ijoxx51I= -go.opentelemetry.io/collector/extension/zpagesextension v0.103.0/go.mod h1:2OUi0Hp+3zPUJmi7goJ6d1/kGgFAw3SDESRX7xQ0QHE= -go.opentelemetry.io/collector/featuregate v1.10.0 h1:krSqokHTp7JthgmtewysqHuOAkcuuZl7G2n91s7HygE= -go.opentelemetry.io/collector/featuregate v1.10.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/otelcol v0.103.0 h1:Skqnc2mxDdk3eiYioUuG7ST6ur5k83SOv7mIBt60fBw= -go.opentelemetry.io/collector/otelcol v0.103.0/go.mod h1:iJF3ghCv+nRZI6+hI7z3kGRZrgH///Fd9tNXY82X90g= -go.opentelemetry.io/collector/pdata v1.10.0 h1:oLyPLGvPTQrcRT64ZVruwvmH/u3SHTfNo01pteS4WOE= -go.opentelemetry.io/collector/pdata v1.10.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= -go.opentelemetry.io/collector/pdata/testdata v0.103.0 h1:iI6NOE0L2je/bxlWzAWHQ/yCtnGupgv42Hl9Al1q/g4= -go.opentelemetry.io/collector/pdata/testdata v0.103.0/go.mod h1:tLzRhb/h37/9wFRQVr+CxjKi5qmhSRpCAiOlhwRkeEk= -go.opentelemetry.io/collector/processor v0.103.0 h1:YZ+LRuHKtOam7SCeLkJAP6bS1d6XxeYP22OyMN3VP0s= -go.opentelemetry.io/collector/processor v0.103.0/go.mod h1:/mxyh0NpJgpZycm7iHDpM7i5PdtWvKKdCZf0cyADJfU= -go.opentelemetry.io/collector/processor/batchprocessor v0.103.0 h1:vunxXGq5Pzcawj4QbXKrIOoXLHpPbRbwNBFPR80X0R4= -go.opentelemetry.io/collector/processor/batchprocessor v0.103.0/go.mod h1:c5nh1LHVlBFQajCnm/5hwKqAvOLpTTOd2GQyB7lT75E= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.103.0 h1:ZwPULpXaIOmY/Niaia2aNyKc40KZE9jorhN+zm6zijw= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.103.0/go.mod h1:BvAZflYYV3/FoHjVDKYfeyx5/bIqJDaeAaf/JtDmc8w= -go.opentelemetry.io/collector/receiver v0.103.0 h1:V3JBKkX+7e/NYpDDZVyeu2VQB1/lLFuoJFPfupdCcZs= -go.opentelemetry.io/collector/receiver v0.103.0/go.mod h1:Yybv4ynKFdMOYViWWPMmjkugR89FSQN0P37wP6mX6qM= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0 h1:TycVVl4AWioV6kWeFcCIk2QuKfXOzn88yw989opsMdE= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0/go.mod h1:jAbzL5lwOGG93YbcPZ6aFZIZq+tjYQ+BS3vKKT2nRgw= -go.opentelemetry.io/collector/semconv v0.103.0 h1:5tlVoZlo9USHAU2Bz4YrEste0Vm5AMufXkYJhAVve1Q= -go.opentelemetry.io/collector/semconv v0.103.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= -go.opentelemetry.io/collector/service v0.103.0 h1:e4Eri4jo+YOuEK0+/JE9SUdT/NZaJ2jz/ROJlmLn96s= -go.opentelemetry.io/collector/service v0.103.0/go.mod h1:p1mlniiC1MuPN5FANYJYgf5V5CGFP0hNqWfI8t7Aw8M= +go.opentelemetry.io/collector v0.104.0 h1:R3zjM4O3K3+ttzsjPV75P80xalxRbwYTURlK0ys7uyo= +go.opentelemetry.io/collector v0.104.0/go.mod h1:Tm6F3na9ajnOm6I5goU9dURKxq1fSBK1yA94nvUix3k= +go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= +go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= +go.opentelemetry.io/collector/config/configauth v0.104.0 h1:ULtjugImijpKuLgGVt0E0HwiZT7+uDUEtMquh1ODB24= +go.opentelemetry.io/collector/config/configauth v0.104.0/go.mod h1:Til+nLLrQwwhgmfcGTX4ZRcNuMhdaWhBW1jH9DLTabQ= +go.opentelemetry.io/collector/config/configcompression v1.11.0 h1:oTwbcLh7mWHSDUIZXkRJVdNAMoBGS39XF68goTMOQq8= +go.opentelemetry.io/collector/config/configcompression v1.11.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= +go.opentelemetry.io/collector/config/configgrpc v0.104.0 h1:E3RtqryQPOm/trJmhlJZj6cCqJNKgv9fOEQvSEpzsFM= +go.opentelemetry.io/collector/config/configgrpc v0.104.0/go.mod h1:tu3ifnJ5pv+4rZcaqNWfvVLjNKb8icSPoClN3THN8PU= +go.opentelemetry.io/collector/config/confighttp v0.104.0 h1:KSY0FSHSjuPyrR6iA2g5oFTozYFpYcy0ssJny8gTNTQ= +go.opentelemetry.io/collector/config/confighttp v0.104.0/go.mod h1:YgSXwuMYHANzzv+IBjHXaBMG/4G2mrseIpICHj+LB3U= +go.opentelemetry.io/collector/config/confignet v0.104.0 h1:i7AOTJf4EQox3SEt1YtQFQR+BwXr3v5D9x3Ai9/ovy8= +go.opentelemetry.io/collector/config/confignet v0.104.0/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= +go.opentelemetry.io/collector/config/configopaque v1.11.0 h1:Pt06PXWVmRaiSX63mzwT8Z9SV/hOc6VHNZbfZ10YY4o= +go.opentelemetry.io/collector/config/configopaque v1.11.0/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= +go.opentelemetry.io/collector/config/configretry v1.11.0 h1:UdEDD0ThxPU7+n2EiKJxVTvDCGygXu9hTfT6LOQv9DY= +go.opentelemetry.io/collector/config/configretry v1.11.0/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/config/configtls v0.104.0 h1:bMmLz2+r+REpO7cDOR+srOJHfitqTZfSZCffDpKfwWk= +go.opentelemetry.io/collector/config/configtls v0.104.0/go.mod h1:e33o7TWcKfe4ToLFyGISEPGMgp6ezf3yHRGY4gs9nKk= +go.opentelemetry.io/collector/config/internal v0.104.0 h1:h3OkxTfXWWrHRyPEGMpJb4fH+54puSBuzm6GQbuEZ2o= +go.opentelemetry.io/collector/config/internal v0.104.0/go.mod h1:KjH43jsAUFyZPeTOz7GrPORMQCK13wRMCyQpWk99gMo= +go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= +go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0 h1:7BhJk71V8xhm8wUpuHG4CVRAPu8JajKj8VmGZ6zS7SA= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0/go.mod h1:o2xTZJpc65SyYPOAGOjyvWwQEqYSWT4Q4/gMfOYpAzc= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0 h1:/3iSlUHH1Q3xeZc55oVekd4dibXzqgphXZI7EaYJ+ak= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0/go.mod h1:RZDXvP81JwvIGeq3rvDBrRKMUfn2BeKCmppHm4Qm0D8= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 h1:B+nMVlIUQxuP52CZSegGuA2z9S+Cv2XwFb2a/TLFPhc= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0/go.mod h1:O0RcaP/I/kn7JHrwohUfj6AwvQYLxjbqg/HnjkvLLTw= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0 h1:6UreSAu64Ft3VfKWE3sjcmf+mWMyWemSsrjS/fjRPpQ= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0/go.mod h1:+vP6R5i9h+oYJNjp4bQHvtSHEu1t+CgSKIeZYZZRQXA= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0 h1:y07I19lmp9VHZ58PJ3nwwd1wqumnIBeMxTNBSh/Vn6k= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0/go.mod h1:WV1HOa0z3Ln5ZkwEW7Cm2pCHkfzYY9kBe0dLy8DqeYA= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0 h1:itBGhyEbX+iz8kz3nc4PYxQx4bL7y87xXNUcGnbKPuY= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0/go.mod h1:iPVsTBkRFHZ21UEfSGWk8c4maOzTp6BWWpTk+l6PjJI= +go.opentelemetry.io/collector/connector v0.104.0 h1:Y82ytwZZ+EruWafEebO0dgWMH+TdkcSONEqZ5bm9JYA= +go.opentelemetry.io/collector/connector v0.104.0/go.mod h1:78SEHel3B3taFnSBg/syW4OV9aU1Ec9KjgbgHf/L8JA= +go.opentelemetry.io/collector/connector/forwardconnector v0.104.0 h1:35tTQfTDb+baDcP1F/wdm/mV7CyMKaOx5un4QWEHYRk= +go.opentelemetry.io/collector/connector/forwardconnector v0.104.0/go.mod h1:N5wZtusSfyIUK1qgbfQ+i6y26rFDTvD4QWJHNMnjLQM= +go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= +go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= +go.opentelemetry.io/collector/exporter v0.104.0 h1:C2HmnfBa05IQ2T+p9T7K7gXVxjrBLd+JxEtAWo7JNbg= +go.opentelemetry.io/collector/exporter v0.104.0/go.mod h1:Rx0oB0E4Ccg1JuAnEWwhtrq1ygRBkfx4mco1DpR3WaQ= +go.opentelemetry.io/collector/exporter/debugexporter v0.104.0 h1:1Z63H/xxv6IzMP7GPmI6v/lQAqZwYZCVC0rWYcYOomw= +go.opentelemetry.io/collector/exporter/debugexporter v0.104.0/go.mod h1:NHVzTM0Z/bomgR7SAe3ysx4CZzh2UJ3TXWSCnaOB1Wo= +go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 h1:EFOdhnc2yGhqou0Tud1HsM7fsgWo/H3tdQhYYytDprQ= +go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0/go.mod h1:fAF7Q3Xh0OkxYWUycdrNNDXkyz3nhHIRKDkez0aQ6zg= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 h1:JkNCOj7DdyJhcYIaRqtS/X+YtAPRjE4pcruyY6LoM7c= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0/go.mod h1:6rs4Xugs7tIC3IFbAC+fj56zLiVc7osXC5UTjk/Mkw4= +go.opentelemetry.io/collector/extension v0.104.0 h1:bftkgFMKya/QIwK+bOxEAPVs/TvTez+s1mlaiUznJkA= +go.opentelemetry.io/collector/extension v0.104.0/go.mod h1:x7K0KyM1JGrtLbafEbRoVp0VpGBHpyx9hu87bsja6S4= +go.opentelemetry.io/collector/extension/auth v0.104.0 h1:SelhccGCrqLThPlkbv6lbAowHsjgOTAWcAPz085IEC4= +go.opentelemetry.io/collector/extension/auth v0.104.0/go.mod h1:s3/C7LTSfa91QK0JPMTRIvH/gCv+a4DGiiNeTAX9OhI= +go.opentelemetry.io/collector/extension/ballastextension v0.104.0 h1:5GESICl2J7jBQ6O8dGHuv077ptoIwhwMiF0zEAfcHcU= +go.opentelemetry.io/collector/extension/ballastextension v0.104.0/go.mod h1:TYZBh3PK6fPzTS/2LOklyn/7Lv79k7/WfOsQrlT9cQQ= +go.opentelemetry.io/collector/extension/zpagesextension v0.104.0 h1:rJ9Sw6DR27s6bW7lWBjJhjth5CXpltAHBKIgUFgVwFs= +go.opentelemetry.io/collector/extension/zpagesextension v0.104.0/go.mod h1:85Exj8r237PIvaXL1a/S0KeVNnm3kQNpVXtu0O2Zk5k= +go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= +go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/otelcol v0.104.0 h1:RnMx7RaSFmX4dq/l3wbXWwcUnFK7RU19AM/0FbMr0Ig= +go.opentelemetry.io/collector/otelcol v0.104.0/go.mod h1:hWFRiHIKT3zbUx6SRevusPRa6mfm+70bPG5CK0glqSU= +go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= +go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= +go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/processor v0.104.0 h1:KSvMDu4DWmK1/k2z2rOzMtTvAa00jnTabtPEK9WOSYI= +go.opentelemetry.io/collector/processor v0.104.0/go.mod h1:qU2/xCCYdvVORkN6aq0H/WUWkvo505VGYg2eOwPvaTg= +go.opentelemetry.io/collector/processor/batchprocessor v0.104.0 h1:6xXvHYkPjwM1zdzliDM2H/omTGgIOkY96JTCln7CFZQ= +go.opentelemetry.io/collector/processor/batchprocessor v0.104.0/go.mod h1:f1VfVdiOlqtJDAvQy8YONEee19nJ3haxNeiMPy59w8M= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0 h1:bfxUNxP2i41Dpdp5cXwVuh4ZIQ8g6e4NDnu5HakWQw4= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0/go.mod h1:2HtP0f+EBu99Uq07JF20fa2FKAsjnIieOZ4f9Jysfpc= +go.opentelemetry.io/collector/receiver v0.104.0 h1:URL1ExkYYd+qbndm7CdGvI2mxzsv/pNfmwJ+1QSQ9/o= +go.opentelemetry.io/collector/receiver v0.104.0/go.mod h1:+enTCZQLf6dRRANWvykXEzrlRw2JDppXJtoYWd/Dd54= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 h1:t9cACuSc7kY09guws7VyB/z9QnG7/zWLC1NQ29WH4+o= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0/go.mod h1:sPIIO4F6uit1i/XQgfe2WryvdO5Hr16bQgZTaXcR8mM= +go.opentelemetry.io/collector/semconv v0.104.0 h1:dUvajnh+AYJLEW/XOPk0T0BlwltSdi3vrjO7nSOos3k= +go.opentelemetry.io/collector/semconv v0.104.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= +go.opentelemetry.io/collector/service v0.104.0 h1:DTpkoX4C6qiA3v3cfB2cHv/cH705o5JI9J3P77SFUrE= +go.opentelemetry.io/collector/service v0.104.0/go.mod h1:eq68zgpqRDYaVp60NeRu973J0rA5vZJkezfw/EzxLXc= go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= From 8a338003d460ce4dabe425b631f96d08e6ee01b2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 2 Jul 2024 02:01:34 +0200 Subject: [PATCH 08/52] Update All OTEL Collector contrib packages to v0.104.0 (#5694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.103.0` -> `v0.104.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.103.0/v0.104.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector-contrib (github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector) ### [`v0.104.0`](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/blob/HEAD/CHANGELOG.md#v01040) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/compare/v0.103.0...v0.104.0) ##### πŸ›‘ Breaking changes πŸ›‘ - `sumologicexporter`: removed compress_encoding ([#​33604](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33604)) - `exporter/clickhouse`: Change behavior of how default database is read from the config ([#​33693](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33693)) Changed the default `database` to `default`. The final database will prioritize `endpoint`, unless `database` is set to a value not equal to `default`. If neither are specified then it defaults to the `default` database. Possible breaking change if someone has the DSN configured in combination with `database` config option. - `exporter/clickhouse`: Add `async_insert` config option to enable inserting asynchronously by default. ([#​33614](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33614)) Adds `async_insert` config option to enable inserting asynchronously by default. To preserve the previous behavior, set `async_insert` to `false` in your config. When enabled, the exporter will insert asynchronously, which can improve performance for high-throughput deployments. The `async_insert` option can be set to `true` or `false` to enable or disable async inserts, respectively. The default value is `true`. Keep in mind this setting is added since the exporter now sets it to default. Async insert and its related settings can still be defined in `endpoint` and `connection_params`, which take priority over the new config option. - `clickhouseexporter`: Add `AggregationTemporality` column to histogram and exponential histogram tables. Rename `AggTemp` column to `AggregationTemporality` in sum table. ([#​33424](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33424)) It's a breaking change. users who upgrade to the latest version need to alter the Clickhouse table: ```sql ALTER TABLE otel_metrics_exponential_histogram ADD COLUMN AggregationTemporality Int32 CODEC(ZSTD(1)); ALTER TABLE otel_metrics_histogram ADD COLUMN AggregationTemporality Int32 CODEC(ZSTD(1)); ALTER TABLE otel_metrics_sum RENAME COLUMN AggTemp TO AggregationTemporality; ``` - `exporter/clickhouse`: Remove deprecated `ttl_days` config option, use `ttl` instead. ([#​33648](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33648)) - `vcenterreceiver`: Drops support for vCenter 6.7 ([#​33607](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33607)) - `all`: Promote `component.UseLocalHostAsDefaultHost` feature gate to beta. This changes default endpoints from 0.0.0.0 to localhost ([#​30702](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/30702)) This change affects the following components: - extension/awsproxy - extension/health_check - extension/health_checkv2 - extension/jaegerremotesampling - internal/aws/proxy - processor/remotetap - receiver/awsfirehose - receiver/awsxray - receiver/influxdb - receiver/jaeger - receiver/loki - receiver/opencensus - receiver/sapm - receiver/signalfx - receiver/skywalking - receiver/splunk_hec - receiver/zipkin - receiver/zookeeper - `receiver/mongodb`: Graduate receiver.mongodb.removeDatabaseAttr feature gate to stable ([#​24972](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/24972)) ##### 🚩 Deprecations 🚩 - `exporter/elasticsearch`: Deprecate the "dedot" configuration. ([#​33772](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33772)) dedot has been deprecated, and will always be enabled in ECS mode and disabled for other modes in future - `exporter/elasticsearch`: Deprecate the "dedup" configuration. ([#​33773](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33773)) dedup has been deprecated, and will always be enabled in future. ##### πŸš€ New components πŸš€ - `otelarrow`: OTel-Arrow exporter and receiver are marked alpha, added to otelcontribcol ([#​26491](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/26491)) ##### πŸ’‘ Enhancements πŸ’‘ - `exporter/elasticsearch`: Add initial support for metrics ([#​33513](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33513)) - `elasticsearchexporter`: Add translation for k8s.deployment.name resource attribute ([#​33622](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33622)) - `k8sattributesprocessor`: Add support for exposing `k8s.pod.ip` as a resource attribute ([#​32960](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32960)) - `geoipprocessor`: Add MaxMind geoip provider for GeoIP2-City and GeoLite2-City databases. ([#​32663](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32663)) - `vcenterreceiver`: Adds vCenter CPU readiness metric for VMs. ([#​33607](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33607)) - `awsemfexporter`: AWS EMF Exporter to add AppSignals metadata flag into the user-agent ([#​32998](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32998)) - `receiver/mongodb`: Ensure support of 6.0 and 7.0 MongoDB versions with integration tests ([#​32716](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32716)) - `sumologicexporter`: added timeout validation ([#​33151](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33151)) - `clickhouseexporter`: Updated the default logs table to a more optimized schema ([#​33611](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33611)) Simplified data types, improved partitioning and time range queries. - `datadogconnector`: Add a feature gate `connector.datadogconnector.NativeIngest` that enables datadog connector to use the new native OTel API in APM stats computation. ([#​33297](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33297)) The feature gate `connector.datadogconnector.NativeIngest` is disabled by default. - `datadogexporter`: Adds Kubernetes DD tags to keep when mapping resource attributes ([#​33728](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33728)) [https://github.com/DataDog/opentelemetry-mapping-go/pull/334](https://togithub.com/DataDog/opentelemetry-mapping-go/pull/334)/334 for details. - `exporter/elasticsearch`: Add data stream routing ([#​33794](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33794), [#​33756](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33756)) `data_stream.dataset` and `data_stream.namespace` in attributes will be respected when config `*_dynamic_index.enabled` is true. - `exporter/elasticsearch`: Encode metrics resource attributes in ECS mapping mode ([#​33823](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33823)) - `elasticsearchexporter`: Preserve `host.name` resource attribute in ECS mode ([#​33670](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33670)) - `servicegraphprocessor`: Added a new configuration option `enable_virtual_node_label` to allow users to identify which node is the virtual node in each edge of the service graph. ([#​31889](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/31889)) - `pkg/stanza`: Switch JSON parser used by json_parser to github.com/goccy/go-json ([#​33784](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33784)) - `k8sobserver`: Add support for k8s.ingress endpoint. ([#​32971](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32971)) - `statsdreceiver`: Optimize statsdreceiver to reduce object allocations ([#​33683](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33683)) - `routingprocessor`: Use mdatagen to define the component's telemetry ([#​33526](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33526)) - `loadbalancerexporter`: Refactors how the load balancing exporter splits metrics ([#​32513](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32513)) All splitting is *behaviorally*, the same. However, the `resource` routingID now uses the `internal/exp/metrics/identity` package to generate the load balancing key, instead of bespoke code. This means that when upgrading to this version your routes for specific metric groupings could change. However, this will be stable and all future metrics will follow the new routing - `receiver/mongodbreceiver`: Add `server.address` and `server.port` resource attributes to MongoDB receiver. ([#​32810](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32810), [#​32350](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32350)) The new resource attributes are added to the MongoDB receiver to distinguish metrics coming from different MongoDB instances. - `server.address`: The address of the MongoDB host, enabled by default. - `server.port`: The port of the MongoDB host, disabled by default. - `observerextension`: Expose host and port in endpoint's environment ([#​33571](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33571)) - `rabbitmqexporter`: Promote rabbitmqexporter to alpha. ([#​33331](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33331)) - `pkg/ottl`: Add a `schema_url` field to access the SchemaURL in resources and scopes on all signals ([#​30229](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/30229)) - `solacereceiver`: Renamed some SemConv fields to support latest semantic conventions for messaging spans (version `1.25.0`) ([#​33499](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33499)) - `sqlserverreceiver`: Enable more perf counter metrics when directly connecting to SQL Server ([#​33420](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33420)) This enables the following metrics by default on non Windows-based systems: `sqlserver.batch.request.rate` `sqlserver.batch.sql_compilation.rate` `sqlserver.batch.sql_recompilation.rate` `sqlserver.page.buffer_cache.hit_ratio` `sqlserver.user.connection.count` - `extension/googleclientauth`: Add Google-signed ID token support ([#​33185](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33185)) Update github.com/GoogleCloudPlatform/opentelemetry-operations-go/extension/googleclientauth to v0.48.0. With this update, extension/googleclientauth now supports Google-signed ID token as auth header. - `vcenterreceiver`: Adds vCenter CPU capacity and network drop rate metrics to hosts. ([#​33607](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33607)) ##### 🧰 Bug fixes 🧰 - `resourcedetectionprocessor`: Fetch CPU info only if related attributes are enabled ([#​33774](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33774)) - `datasetexporter`: Upgrade dataset-go to v0.19.0 and fix found issues ([#​33498](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33498), [#​32533](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32533), [#​33675](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33675)) Upgrade `dataset-go` library from v0.18.0 to v0.19.0. Enable skipped integration test and adjust the test so it is passing again. Do not validate configuration, let the framework run the validation. - `datasetexporter`: Upgrade dataset-go to v0.20.0 ([#​33812](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33812)) Upgrade `dataset-go` library from v0.19.0 to v0.20.0. Make number of outgoing connections configurable. - `datadogexporter`: Fix panics on invalid sized trace & span IDs ([#​33566](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33566)) [https://github.com/DataDog/opentelemetry-mapping-go/pull/340](https://togithub.com/DataDog/opentelemetry-mapping-go/pull/340)/340 for details. - `datadogexporter`: Ignore metric datapoints with `no recorded value` flag ([#​33728](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33728)) This flag is not supported by Datadog, so we just ignore these datapoints. [https://github.com/DataDog/opentelemetry-mapping-go/pull/330](https://togithub.com/DataDog/opentelemetry-mapping-go/pull/330)/330 for details. - `tailsamplingprocessor`: Fix precedence of inverted match in and policy ([#​33671](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33671)) Previously if the decision from a policy evaluation was `NotSampled` or `InvertNotSampled` it would return a `NotSampled` decision regardless, effectively downgrading the result. This was breaking the documented behaviour that inverted decisions should take precedence over all others. - `otelarrowreceiver`: Ensure consume operations are not canceled at stream EOF. ([#​33570](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33570)) - `vcenterreceiver`: Fixes errors in some of the client calls for environments containing multiple datacenters. ([#​33734](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33734))
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 28 +++++++++++++-------------- go.sum | 60 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/go.mod b/go.mod index 118a7dd5650..92c9de8e54e 100644 --- a/go.mod +++ b/go.mod @@ -23,12 +23,12 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 github.com/kr/pretty v0.3.1 github.com/olivere/elastic v6.2.37+incompatible - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.103.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.55.0 @@ -147,14 +147,14 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.103.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.103.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.103.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect diff --git a/go.sum b/go.sum index a61659230c0..9d0edde53e4 100644 --- a/go.sum +++ b/go.sum @@ -254,36 +254,36 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.103.0 h1:th1Swa6AOTpbr8Yui5/LLQjIwUZhV4wcbfvusKL9qSk= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.103.0/go.mod h1:5bCbYY4xRBBIwzUOdBcezz6iff7+LtPNZBYYxk+cFro= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.103.0 h1:N4+Kxr4WZ4HNuU334NaqAAjngG/IRkSTGCl9c5H+QY0= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.103.0/go.mod h1:3rtBpjlTpg3s+bXPNM/7o7IQZQYtwytrz9PEF+ISz8E= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.103.0 h1:txNSkgEEmDyrasuGO9egQ+58i+7P/mJKdHmSHg0sO4c= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.103.0/go.mod h1:XtRqfouM/9owDyCIi2TksmSc1sfLGmLRiFhyQ7KFS6w= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.103.0 h1:olbjLOuCgVCiRNzdg0I9Lv7VuUHFbEuqP31fdriyqi0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.103.0/go.mod h1:2Zksmb1fF+4ksNsOxSVrHz5IoC/2ljvtqJGzy7qe8+E= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.103.0 h1:xtU09wCMSp/VazMC4qjP69LnuUUNDj6aGNG/jmSZXTM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.103.0/go.mod h1:arqw5KwD4HBC3PZeqsLqMWPmnkaOcrrW5bMndHwNyO4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.103.0 h1:gksMpwy9oZN14E4kRBfLtVkE8YJn++7woM1b3hQboJg= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.103.0/go.mod h1:OLpJzn4LgzICAnyu+7mJ33rM2WOgPWpjXvZ6YKrJ6yM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.103.0 h1:JjHxUTE7cbrqddMLueLhVcWbxxr9INLf5sIsRBcuPUE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.103.0/go.mod h1:DQUw8EmCHCqTIBfHo5Fe7MyYLXSWdInDrKkINhOMuPk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.103.0 h1:XYkQCe4UPFy7qmBs1zhknhe1wzPnAff4Rb4WtnD8aAQ= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.103.0/go.mod h1:hmeKPJaZjzOjcndDxpWnjt0781EMqvj3or01baNVoRI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.103.0 h1:1cZyMMLSpSWFdfITyVc9Bb+8rn175/GGwtWZQ3nClpc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.103.0/go.mod h1:o8BPP4DM2SkdkPJxJOdmgxKz5DftGcuyUXgqf5MoWAw= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.103.0 h1:GiP0syg12+MrI5IpL8Qt+rQktWDMsP0/8Nu9qmMtscw= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.103.0/go.mod h1:akYmkj+fLA32/LkQTJM9KIqaOvtsyjLV1NZkFU1E6w8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.103.0 h1:diJ27fBrfu/oOW0bv8q3BWbVmjNLMBJF2RgzSq6KRgI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.103.0/go.mod h1:u8Ell52AGRzNA5RjfaunzYQWBb+7tKb3ZlAQJyQzNXM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.103.0 h1:2Fxuu4RbroXQFpUB/ZuZXyUb4QoL8XgOe7KlkK3TxHU= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.103.0/go.mod h1:o3ju9lTtG+PnSjffls/sEGvgfYMG1jZZeT1h0rzI+T4= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.103.0 h1:Hblr03Vde7jlnAsLSayhq1VG+gpTfVJNVvZqnx0fwDY= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.103.0/go.mod h1:kY7NC2dfScT9zmss53yuhZNkv7XQGl46yXxTr+xEYPo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.103.0 h1:/BabP7nnV4cyI1JZNQn5zzCrJymzPpCjCMnCXex0/kU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.103.0/go.mod h1:TGJchv8xra/30Kz8oaOgvF1XyARtOSYqWowAJ5NxQyI= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.103.0 h1:AvfCPJtrzfAmoF58vTA3pehns51NUEOmulPxrYALroY= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.103.0/go.mod h1:WzOea7GxCLC23+HBXHoYwahGC+YJsu066pV4MzUL0fg= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0 h1:6dvpPt8pCcV+TfMnnanFk2NQYf9HN1voSS9iIHdW+L8= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0/go.mod h1:MfSM6mt9qH3vHCaj2rlX6IY/7fN+zCLzNJC25XG9rNU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0 h1:xDA/V4cZ4LXj70la1uzvGaX/xfzeGIEq3txhF7W6TAg= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0/go.mod h1:BxDMJl5xzSbCwcuVFs9jIrBwc1sflBVdihNJxcEKkOE= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 h1:VD2R4q2XziQCJIAsQG2qhlSKyDoT9XaTR2LNkJHs2C0= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0/go.mod h1:sOdPmcOeSXXqZeBflu3Oa+0aWFL8QkAKpr/X1txJYSs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0 h1:4ke4j/y7AQnRAyYveB+KGcdjVYEKVrwTxc3BDHagdd0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0/go.mod h1:I2zX9YBggIum9LAHXN1DqqbYOENrHXbXdkXouhwVCHw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0 h1:/koTWTWCFF7tBYkDX5UzCaEc/ceTU8jij/Yzuj0So3M= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0/go.mod h1:KWVekIHTPScOrLKVYOiijxfEdGK5OBhD4EFNBh96ESg= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0 h1:BGKkg/wBfDeKSMqj8tMC6v03XtMuL9lNltfZiMViBAU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0/go.mod h1:SqzW5R0kOIs6HAk18+zH+Ej7CehtLVKtyBifT1wqAt0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0 h1:pH5vUaC85j8DcgfgFXlQW3QRoED9DCAGJ5lGw4J/UvE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0/go.mod h1:BsappX8t6TNyk+M0UZ3xMwEtn2IIHy7hqXlThdBoKjI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 h1:bgS1X1UnUuYfKXsQPq3U50jsMNpN5lI+BcDeklPJOW8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0/go.mod h1:tImy4FWNu1qpaXRVaNi2BU+TmZHtYgLO6LbB6mspZio= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 h1:Pl4rXXpRG/xJuNWUS3I/w1jViHcrssMf47bGX/Ug/KY= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0/go.mod h1:tP4dyc5+g/qoXYb8lmNj+y+Nhphn4MkL23/np0Zhx2g= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0 h1:V58XfkZBVuOcNL/+US/ZnG8mVy5AbVHV49mGDIgIMo8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0/go.mod h1:HpEqZW6TOsujFvvOSkcCFj7N2NEW4LP/Q6X7/ryfSnA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0 h1:3joQv7QiLvsVfrpqYAxHvq3bKUaUEpgg93fMLW+TU2w= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0/go.mod h1:aUAgxXQQPiSajwMXQv4LobDTc16ezeF9S1Xh53yHbOg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0 h1:oIYYjBh2kNi7APSArA/9YCQzLwOlMdUhqMxUoMoTChY= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0/go.mod h1:hRayDDoU1e1POXuDO7RpwcqIirFJoCdSgHgICY0hNNI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0 h1:9HJ3ejNoiMFWxTRy9gobdurEocf79QlxwlYrOY9tMIQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0/go.mod h1:Ax4DroNn/xKyjWoJCd3FQE9xOZqHSTdDEj1I3HLNOeQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0 h1:sE+B+i3m9sMecnJZkljnUrykzkRkEFvXJWPckwbQOVc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0/go.mod h1:cyzp/19NsVmEz7mTS/LHf2m8e26MnlGK8x1kga3rX9I= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0 h1:U04Ezl3Keb1j6bcVktvgvAbbMEyPDkM5sNboQgPYI1w= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0/go.mod h1:GbpsurP8UERCcHyIB/gUMKcAK3kIypKGE0O+aqbNa/c= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= From b014bcdc0ad89c99de9d7b49a8b572bcdd45b409 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 2 Jul 2024 22:24:14 +0200 Subject: [PATCH 09/52] Update module google.golang.org/grpc to v1.65.0 (#5697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google.golang.org/grpc](https://togithub.com/grpc/grpc-go) | `v1.64.0` -> `v1.65.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.65.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.65.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.64.0/v1.65.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.64.0/v1.65.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
grpc/grpc-go (google.golang.org/grpc) ### [`v1.65.0`](https://togithub.com/grpc/grpc-go/releases/tag/v1.65.0): Release 1.65.0 [Compare Source](https://togithub.com/grpc/grpc-go/compare/v1.64.0...v1.65.0) ### Dependencies - Change support policy to cover only the latest TWO releases of Go, matching the policy for Go itself. See [#​7249](https://togithub.com/grpc/grpc-go/issues/7249) for more information. ([#​7250](https://togithub.com/grpc/grpc-go/issues/7250)) - Update x/net/http2 to address [CVE-2023-45288](https://nvd.nist.gov/vuln/detail/CVE-2023-45288) ([#​7282](https://togithub.com/grpc/grpc-go/issues/7282)) ### Behavior Changes - credentials/tls: clients and servers will now reject connections that don't support ALPN when environment variable `GRPC_ENFORCE_ALPN_ENABLED` is set to "true" (case insensitive). ([#​7184](https://togithub.com/grpc/grpc-go/issues/7184)) - NOTE: this behavior will become the default in a future release. - metadata: remove String method from MD to make printing more consistent ([#​7373](https://togithub.com/grpc/grpc-go/issues/7373)) ### New Features - grpc: add `WithMaxCallAttempts` to configure gRPC's retry behavior per-channel. ([#​7229](https://togithub.com/grpc/grpc-go/issues/7229)) - Special Thanks: [@​imoore76](https://togithub.com/imoore76) ### Bug Fixes - ringhash: properly apply endpoint weights instead of ignoring them ([#​7156](https://togithub.com/grpc/grpc-go/issues/7156)) - xds: fix a bug that could cause xds-enabled servers to stop accepting new connections after handshaking errors ([#​7128](https://togithub.com/grpc/grpc-go/issues/7128)) - Special Thanks: [@​bozaro](https://togithub.com/bozaro)
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 92c9de8e54e..37d41bb7b4c 100644 --- a/go.mod +++ b/go.mod @@ -82,7 +82,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/net v0.26.0 golang.org/x/sys v0.21.0 - google.golang.org/grpc v1.64.0 + google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 ) @@ -106,7 +106,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -214,8 +214,8 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/text v0.16.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 9d0edde53e4..d19ce3ecf4e 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -657,17 +657,17 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 5b90982d4ce2018f3dc6ebdca821c06cd79bb930 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 3 Jul 2024 03:35:06 +0200 Subject: [PATCH 10/52] Update dependency go to v1.22.5 (#5696) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [go](https://go.dev/) ([source](https://togithub.com/golang/go)) | toolchain | patch | `1.22.4` -> `1.22.5` | --- ### Release Notes
golang/go (go) ### [`v1.22.5`](https://togithub.com/golang/go/compare/go1.22.4...go1.22.5)
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 37d41bb7b4c..a51b073074f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/jaegertracing/jaeger go 1.21.0 -toolchain go1.22.4 +toolchain go1.22.5 require ( github.com/HdrHistogram/hdrhistogram-go v1.1.2 From 1b4f355c84e6d6ed99edd29dfd870663eafca938 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 3 Jul 2024 03:36:11 +0200 Subject: [PATCH 11/52] Update golang Docker tag to v1.22.5 (#5699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | golang | final | patch | `1.22.4-alpine` -> `1.22.5-alpine` | | golang | stage | patch | `1.22.4-alpine` -> `1.22.5-alpine` | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- docker/debug/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile index f173519b3dd..31cf0351e9b 100644 --- a/docker/debug/Dockerfile +++ b/docker/debug/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.4-alpine AS build +FROM golang:1.22.5-alpine AS build ARG TARGETARCH ENV GOPATH /go RUN apk add --update --no-cache ca-certificates make git build-base mailcap @@ -10,7 +10,7 @@ RUN if [[ "$TARGETARCH" == "s390x" || "$TARGETARCH" == "ppc64le" ]] ; then \ go install github.com/go-delve/delve/cmd/dlv@latest; \ fi -FROM golang:1.22.4-alpine +FROM golang:1.22.5-alpine COPY --from=build /go/bin/dlv /go/bin/dlv COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=build /etc/mime.types /etc/mime.types From bbd863ff5574735de3a3d30630b7bc6cf018729c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 3 Jul 2024 05:50:57 +0200 Subject: [PATCH 12/52] Update opentelemetry-go to v1.28.0 and refactor references to semantic conventions (#5698) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to dependency upgrade: * some fixes to Makefile to install tools * move all references to versioned semconv to a helper package otelsemconv so that we don't have to keep semver in sync in many places (but we still have the linter for that). * fix otel_tag adjuster to look for the new `telemetry.sdk.*` attributes, not the deprecated `otel.library.*` * change db instrumentation to use new `db.query.text` attrs instead of deprecated `db.statement` [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracegrpc/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fotlp%2fotlptrace%2fotlptracehttp/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/prometheus](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.49.0` -> `v0.50.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fprometheus/v0.49.0/v0.50.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fexporters%2fstdout%2fstdouttrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fmetric/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fmetric/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fmetric/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fmetric/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/sdk/metric](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2fmetric/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | `v1.27.0` -> `v1.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2ftrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2ftrace/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2ftrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2ftrace/v1.27.0/v1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel) ### [`v1.28.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0): Releases v1.28.0/v0.50.0/v0.4.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.27.0...v1.28.0) #### Overview ##### Added - The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`. This method is used to check if an `Instrument` instance is a zero-value. ([#​5431](https://togithub.com/open-telemetry/opentelemetry-go/issues/5431)) - Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. ([#​5468](https://togithub.com/open-telemetry/opentelemetry-go/issues/5468)) - The `go.opentelemetry.io/otel/semconv/v1.26.0` package. The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. ([#​5476](https://togithub.com/open-telemetry/opentelemetry-go/issues/5476)) - The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. ([#​5499](https://togithub.com/open-telemetry/opentelemetry-go/issues/5499)) - The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. ([#​5530](https://togithub.com/open-telemetry/opentelemetry-go/issues/5530)) ##### Changed - `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. ([#​5457](https://togithub.com/open-telemetry/opentelemetry-go/issues/5457)) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. ([#​5490](https://togithub.com/open-telemetry/opentelemetry-go/issues/5490)) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. ([#​5490](https://togithub.com/open-telemetry/opentelemetry-go/issues/5490)) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. ([#​5490](https://togithub.com/open-telemetry/opentelemetry-go/issues/5490)) - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes. - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. ([#​5490](https://togithub.com/open-telemetry/opentelemetry-go/issues/5490)) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. ([#​5490](https://togithub.com/open-telemetry/opentelemetry-go/issues/5490)) - `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. ([#​5493](https://togithub.com/open-telemetry/opentelemetry-go/issues/5493)) - Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. ([#​5497](https://togithub.com/open-telemetry/opentelemetry-go/issues/5497)) - `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. ([#​5520](https://togithub.com/open-telemetry/opentelemetry-go/issues/5520)) - Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. ([#​5545](https://togithub.com/open-telemetry/opentelemetry-go/issues/5545)) ##### Fixed - Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. ([#​5376](https://togithub.com/open-telemetry/opentelemetry-go/issues/5376)) - Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. ([#​5426](https://togithub.com/open-telemetry/opentelemetry-go/issues/5426)) - Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. ([#​5426](https://togithub.com/open-telemetry/opentelemetry-go/issues/5426)) - Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. ([#​5434](https://togithub.com/open-telemetry/opentelemetry-go/issues/5434)) - Document instrument name requirements in `go.opentelemetry.io/otel/metric`. ([#​5435](https://togithub.com/open-telemetry/opentelemetry-go/issues/5435)) - Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. ([#​5456](https://togithub.com/open-telemetry/opentelemetry-go/issues/5456)) - Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. ([#​5464](https://togithub.com/open-telemetry/opentelemetry-go/issues/5464)) - Fix panic in baggage creation when a member contains `0x80` char in key or value. ([#​5494](https://togithub.com/open-telemetry/opentelemetry-go/issues/5494)) - Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. ([#​5508](https://togithub.com/open-telemetry/opentelemetry-go/issues/5508)) - Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. ([#​5514](https://togithub.com/open-telemetry/opentelemetry-go/issues/5514)) - Fix stale timestamps reported by the last-value aggregation. ([#​5517](https://togithub.com/open-telemetry/opentelemetry-go/issues/5517)) - Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. ([#​5521](https://togithub.com/open-telemetry/opentelemetry-go/issues/5521)) - Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. ([#​5549](https://togithub.com/open-telemetry/opentelemetry-go/issues/5549)) #### What's Changed - Recheck log message in TestBatchProcessor by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5386](https://togithub.com/open-telemetry/opentelemetry-go/pull/5386) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`dc85e6b`](https://togithub.com/open-telemetry/opentelemetry-go/commit/dc85e6b) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5391](https://togithub.com/open-telemetry/opentelemetry-go/pull/5391) - fix(deps): update module go.opentelemetry.io/contrib/bridges/otelslog to v0.2.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5395](https://togithub.com/open-telemetry/opentelemetry-go/pull/5395) - fix(deps): update module github.com/go-logr/logr to v1.4.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5393](https://togithub.com/open-telemetry/opentelemetry-go/pull/5393) - fix(deps): update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.52.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5396](https://togithub.com/open-telemetry/opentelemetry-go/pull/5396) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`d264139`](https://togithub.com/open-telemetry/opentelemetry-go/commit/d264139) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5397](https://togithub.com/open-telemetry/opentelemetry-go/pull/5397) - fix(deps): update module go.opentelemetry.io/otel/sdk/log to v0.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5398](https://togithub.com/open-telemetry/opentelemetry-go/pull/5398) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.101.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5400](https://togithub.com/open-telemetry/opentelemetry-go/pull/5400) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`d264139`](https://togithub.com/open-telemetry/opentelemetry-go/commit/d264139) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5399](https://togithub.com/open-telemetry/opentelemetry-go/pull/5399) - \[chore] example/otel-collector: Fix README title by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5404](https://togithub.com/open-telemetry/opentelemetry-go/pull/5404) - Pool `otlploghttp` transform maps by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5378](https://togithub.com/open-telemetry/opentelemetry-go/pull/5378) - fix(deps): update module golang.org/x/vuln to v1.1.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5405](https://togithub.com/open-telemetry/opentelemetry-go/pull/5405) - Fix test name in otlploghttp by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5411](https://togithub.com/open-telemetry/opentelemetry-go/pull/5411) - sdk/log: Fix BenchmarkLoggerNewRecord to not drop attributes by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5407](https://togithub.com/open-telemetry/opentelemetry-go/pull/5407) - chore(deps): update dependency codespell to v2.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5409](https://togithub.com/open-telemetry/opentelemetry-go/pull/5409) - fix(deps): update module github.com/golangci/golangci-lint to v1.59.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5419](https://togithub.com/open-telemetry/opentelemetry-go/pull/5419) - fix(deps): update golang.org/x/tools digest to [`7045d2e`](https://togithub.com/open-telemetry/opentelemetry-go/commit/7045d2e) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5406](https://togithub.com/open-telemetry/opentelemetry-go/pull/5406) - fix(deps): update golang.org/x/exp digest to [`4c93da0`](https://togithub.com/open-telemetry/opentelemetry-go/commit/4c93da0) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5415](https://togithub.com/open-telemetry/opentelemetry-go/pull/5415) - Log a warning when log Record attribute is dropped by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5376](https://togithub.com/open-telemetry/opentelemetry-go/pull/5376) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`a332354`](https://togithub.com/open-telemetry/opentelemetry-go/commit/a332354) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5424](https://togithub.com/open-telemetry/opentelemetry-go/pull/5424) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`a332354`](https://togithub.com/open-telemetry/opentelemetry-go/commit/a332354) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5423](https://togithub.com/open-telemetry/opentelemetry-go/pull/5423) - fix(deps): update golang.org/x/tools digest to [`f10a0f1`](https://togithub.com/open-telemetry/opentelemetry-go/commit/f10a0f1) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5430](https://togithub.com/open-telemetry/opentelemetry-go/pull/5430) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`5315273`](https://togithub.com/open-telemetry/opentelemetry-go/commit/5315273) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5428](https://togithub.com/open-telemetry/opentelemetry-go/pull/5428) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`5315273`](https://togithub.com/open-telemetry/opentelemetry-go/commit/5315273) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5427](https://togithub.com/open-telemetry/opentelemetry-go/pull/5427) - fix(deps): update golang.org/x/tools digest to [`e229045`](https://togithub.com/open-telemetry/opentelemetry-go/commit/e229045) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5432](https://togithub.com/open-telemetry/opentelemetry-go/pull/5432) - fix(deps): update golang.org/x/exp digest to [`23cca88`](https://togithub.com/open-telemetry/opentelemetry-go/commit/23cca88) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5429](https://togithub.com/open-telemetry/opentelemetry-go/pull/5429) - sdk/log: Fix TestBatchProcessor/DroppedLogs flaky test by [@​amanakin](https://togithub.com/amanakin) in [https://github.com/open-telemetry/opentelemetry-go/pull/5421](https://togithub.com/open-telemetry/opentelemetry-go/pull/5421) - Identify global `Tracer`s and `Meter`s with their schema URLs by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5426](https://togithub.com/open-telemetry/opentelemetry-go/pull/5426) - sdk/log: Fix TestBatchProcessor/ForceFlush/ErrorPartialFlush flaky test by [@​amanakin](https://togithub.com/amanakin) in [https://github.com/open-telemetry/opentelemetry-go/pull/5416](https://togithub.com/open-telemetry/opentelemetry-go/pull/5416) - Export the Instrument IsEmpty method by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5431](https://togithub.com/open-telemetry/opentelemetry-go/pull/5431) - fix(deps): update golang.org/x/tools digest to [`01018ba`](https://togithub.com/open-telemetry/opentelemetry-go/commit/01018ba) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5438](https://togithub.com/open-telemetry/opentelemetry-go/pull/5438) - \[chore] ensure codecov uses token by [@​codeboten](https://togithub.com/codeboten) in [https://github.com/open-telemetry/opentelemetry-go/pull/5440](https://togithub.com/open-telemetry/opentelemetry-go/pull/5440) - fix(deps): update golang.org/x/tools digest to [`8d54ca1`](https://togithub.com/open-telemetry/opentelemetry-go/commit/8d54ca1) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5441](https://togithub.com/open-telemetry/opentelemetry-go/pull/5441) - fix(deps): update golang.org/x/tools digest to [`2e977dd`](https://togithub.com/open-telemetry/opentelemetry-go/commit/2e977dd) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5442](https://togithub.com/open-telemetry/opentelemetry-go/pull/5442) - Remove zeroInstrumentKind by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5433](https://togithub.com/open-telemetry/opentelemetry-go/pull/5433) - Log warning when a trace attribute/event/link is discarded due to limits by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5434](https://togithub.com/open-telemetry/opentelemetry-go/pull/5434) - Remove opentelemetry-proto in .gitsubmodule by [@​YHM404](https://togithub.com/YHM404) in [https://github.com/open-telemetry/opentelemetry-go/pull/5267](https://togithub.com/open-telemetry/opentelemetry-go/pull/5267) - Document instrument name requirements by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5435](https://togithub.com/open-telemetry/opentelemetry-go/pull/5435) - fix(deps): update golang.org/x/exp digest to [`404ba88`](https://togithub.com/open-telemetry/opentelemetry-go/commit/404ba88) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5445](https://togithub.com/open-telemetry/opentelemetry-go/pull/5445) - Move `MonotonicEndTime` to only use by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5443](https://togithub.com/open-telemetry/opentelemetry-go/pull/5443) - fix(deps): update golang.org/x/tools digest to [`624dbd0`](https://togithub.com/open-telemetry/opentelemetry-go/commit/624dbd0) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5446](https://togithub.com/open-telemetry/opentelemetry-go/pull/5446) - fix(deps): update golang.org/x/exp digest to [`fd00a4e`](https://togithub.com/open-telemetry/opentelemetry-go/commit/fd00a4e) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5450](https://togithub.com/open-telemetry/opentelemetry-go/pull/5450) - fix(deps): update golang.org/x/tools digest to [`2f8e378`](https://togithub.com/open-telemetry/opentelemetry-go/commit/2f8e378) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5451](https://togithub.com/open-telemetry/opentelemetry-go/pull/5451) - fix(deps): update golang.org/x/tools digest to [`cc29c91`](https://togithub.com/open-telemetry/opentelemetry-go/commit/cc29c91) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5452](https://togithub.com/open-telemetry/opentelemetry-go/pull/5452) - chore(deps): update module github.com/prometheus/procfs to v0.15.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5453](https://togithub.com/open-telemetry/opentelemetry-go/pull/5453) - sdk/log: Add processor benchmarks by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5448](https://togithub.com/open-telemetry/opentelemetry-go/pull/5448) - fix(deps): update module github.com/itchyny/gojq to v0.12.16 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5460](https://togithub.com/open-telemetry/opentelemetry-go/pull/5460) - Guard rng in exemplar rand computation by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5456](https://togithub.com/open-telemetry/opentelemetry-go/pull/5456) - chore(deps): update module github.com/prometheus/common to v0.54.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5472](https://togithub.com/open-telemetry/opentelemetry-go/pull/5472) - add `log` package to depguard linter by [@​amanakin](https://togithub.com/amanakin) in [https://github.com/open-telemetry/opentelemetry-go/pull/5463](https://togithub.com/open-telemetry/opentelemetry-go/pull/5463) - fix(deps): update golang.org/x/tools digest to [`58cc8a4`](https://togithub.com/open-telemetry/opentelemetry-go/commit/58cc8a4) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5473](https://togithub.com/open-telemetry/opentelemetry-go/pull/5473) - fix(deps): update golang.org/x/tools digest to [`4478db0`](https://togithub.com/open-telemetry/opentelemetry-go/commit/4478db0) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5474](https://togithub.com/open-telemetry/opentelemetry-go/pull/5474) - sdk/log: Fix counting number of dropped attributes of log `Record` by [@​amanakin](https://togithub.com/amanakin) in [https://github.com/open-telemetry/opentelemetry-go/pull/5464](https://togithub.com/open-telemetry/opentelemetry-go/pull/5464) - fix(deps): update golang.org/x/tools digest to [`2088083`](https://togithub.com/open-telemetry/opentelemetry-go/commit/2088083) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5477](https://togithub.com/open-telemetry/opentelemetry-go/pull/5477) - trace: Span in noop.Start is no longer allocated by [@​tttoad](https://togithub.com/tttoad) in [https://github.com/open-telemetry/opentelemetry-go/pull/5457](https://togithub.com/open-telemetry/opentelemetry-go/pull/5457) - chore(deps): update module golang.org/x/sys to v0.21.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5481](https://togithub.com/open-telemetry/opentelemetry-go/pull/5481) - fix(deps): update module golang.org/x/tools to v0.22.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5485](https://togithub.com/open-telemetry/opentelemetry-go/pull/5485) - Bump min Go version used in CI by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5489](https://togithub.com/open-telemetry/opentelemetry-go/pull/5489) - chore(deps): update module golang.org/x/text to v0.16.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5482](https://togithub.com/open-telemetry/opentelemetry-go/pull/5482) - Add `semconv/v1.26.0`, removes deprecated semconvs by [@​MadVikingGod](https://togithub.com/MadVikingGod) in [https://github.com/open-telemetry/opentelemetry-go/pull/5476](https://togithub.com/open-telemetry/opentelemetry-go/pull/5476) - Add the sdk/internal/x package by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5444](https://togithub.com/open-telemetry/opentelemetry-go/pull/5444) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.102.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5479](https://togithub.com/open-telemetry/opentelemetry-go/pull/5479) - chore(deps): update module golang.org/x/net to v0.26.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5484](https://togithub.com/open-telemetry/opentelemetry-go/pull/5484) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`ef581f9`](https://togithub.com/open-telemetry/opentelemetry-go/commit/ef581f9) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5486](https://togithub.com/open-telemetry/opentelemetry-go/pull/5486) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`ef581f9`](https://togithub.com/open-telemetry/opentelemetry-go/commit/ef581f9) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5487](https://togithub.com/open-telemetry/opentelemetry-go/pull/5487) - fix(deps): update golang.org/x/exp digest to [`fc45aab`](https://togithub.com/open-telemetry/opentelemetry-go/commit/fc45aab) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5488](https://togithub.com/open-telemetry/opentelemetry-go/pull/5488) - log/logtest: provide record with their context by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5468](https://togithub.com/open-telemetry/opentelemetry-go/pull/5468) - Upgrade semconv use to v1.26.0 by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5490](https://togithub.com/open-telemetry/opentelemetry-go/pull/5490) - sdk/log: Remove slice allocation from SimpleProcessor.OnEmit by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5493](https://togithub.com/open-telemetry/opentelemetry-go/pull/5493) - fix(deps): update module golang.org/x/vuln to v1.1.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5496](https://togithub.com/open-telemetry/opentelemetry-go/pull/5496) - fix(deps): update module github.com/golangci/golangci-lint to v1.59.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5498](https://togithub.com/open-telemetry/opentelemetry-go/pull/5498) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`a8a6208`](https://togithub.com/open-telemetry/opentelemetry-go/commit/a8a6208) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5501](https://togithub.com/open-telemetry/opentelemetry-go/pull/5501) - Introduce logtest.AssertRecordEqual by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5499](https://togithub.com/open-telemetry/opentelemetry-go/pull/5499) - Add implementation of otlploggrpc configuration by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5383](https://togithub.com/open-telemetry/opentelemetry-go/pull/5383) - fix(deps): update golang.org/x/exp digest to [`7f521ea`](https://togithub.com/open-telemetry/opentelemetry-go/commit/7f521ea) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5512](https://togithub.com/open-telemetry/opentelemetry-go/pull/5512) - Move evantorrie to emeritus status by [@​evantorrie](https://togithub.com/evantorrie) in [https://github.com/open-telemetry/opentelemetry-go/pull/5507](https://togithub.com/open-telemetry/opentelemetry-go/pull/5507) - Add missing word in WithView() doc string by [@​juliusv](https://togithub.com/juliusv) in [https://github.com/open-telemetry/opentelemetry-go/pull/5506](https://togithub.com/open-telemetry/opentelemetry-go/pull/5506) - chore(deps): update codecov/codecov-action action to v4.5.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5509](https://togithub.com/open-telemetry/opentelemetry-go/pull/5509) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.102.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5491](https://togithub.com/open-telemetry/opentelemetry-go/pull/5491) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`a8a6208`](https://togithub.com/open-telemetry/opentelemetry-go/commit/a8a6208) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5502](https://togithub.com/open-telemetry/opentelemetry-go/pull/5502) - fix(deps): update module google.golang.org/protobuf to v1.34.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5503](https://togithub.com/open-telemetry/opentelemetry-go/pull/5503) - trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. by [@​tttoad](https://togithub.com/tttoad) in [https://github.com/open-telemetry/opentelemetry-go/pull/5497](https://togithub.com/open-telemetry/opentelemetry-go/pull/5497) - chore(deps): update jaegertracing/all-in-one docker tag to v1.58 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5504](https://togithub.com/open-telemetry/opentelemetry-go/pull/5504) - fix(deps): update module go.opentelemetry.io/proto/otlp to v1.3.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5505](https://togithub.com/open-telemetry/opentelemetry-go/pull/5505) - fix(baggage): validate chars panic with 0x80 by [@​fabiobozzo](https://togithub.com/fabiobozzo) in [https://github.com/open-telemetry/opentelemetry-go/pull/5494](https://togithub.com/open-telemetry/opentelemetry-go/pull/5494) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`68d350f`](https://togithub.com/open-telemetry/opentelemetry-go/commit/68d350f) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5516](https://togithub.com/open-telemetry/opentelemetry-go/pull/5516) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`68d350f`](https://togithub.com/open-telemetry/opentelemetry-go/commit/68d350f) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5515](https://togithub.com/open-telemetry/opentelemetry-go/pull/5515) - Correct the comment for the priority of options and environments on otlptracegrpc by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5508](https://togithub.com/open-telemetry/opentelemetry-go/pull/5508) - Fix IDGenerator may generate zero TraceId / SpanId by [@​Charlie-lizhihan](https://togithub.com/Charlie-lizhihan) in [https://github.com/open-telemetry/opentelemetry-go/pull/5514](https://togithub.com/open-telemetry/opentelemetry-go/pull/5514) - Fix timestamp handling for the lastvalue aggregation by [@​dashpole](https://togithub.com/dashpole) in [https://github.com/open-telemetry/opentelemetry-go/pull/5517](https://togithub.com/open-telemetry/opentelemetry-go/pull/5517) - Add tenv linter by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5524](https://togithub.com/open-telemetry/opentelemetry-go/pull/5524) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.103.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5526](https://togithub.com/open-telemetry/opentelemetry-go/pull/5526) - chore(deps): update prom/prometheus docker tag to v2.53.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5525](https://togithub.com/open-telemetry/opentelemetry-go/pull/5525) - Do not fail CI on codecov create report by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5532](https://togithub.com/open-telemetry/opentelemetry-go/pull/5532) - Add unconvert linter by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5529](https://togithub.com/open-telemetry/opentelemetry-go/pull/5529) - Add unparam linter by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5531](https://togithub.com/open-telemetry/opentelemetry-go/pull/5531) - Add example for synchronous gauge by [@​bagmeg](https://togithub.com/bagmeg) in [https://github.com/open-telemetry/opentelemetry-go/pull/5492](https://togithub.com/open-telemetry/opentelemetry-go/pull/5492) - Add `newClient` method for otlploggrpc gRPC client by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5523](https://togithub.com/open-telemetry/opentelemetry-go/pull/5523) - Verify versions.yaml is up to date in CI by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5533](https://togithub.com/open-telemetry/opentelemetry-go/pull/5533) - Populate `service.instance.id` with a default value when `OTEL_GO_X_RESOURCE` is set by [@​pyohannes](https://togithub.com/pyohannes) in [https://github.com/open-telemetry/opentelemetry-go/pull/5520](https://togithub.com/open-telemetry/opentelemetry-go/pull/5520) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`dc46fd2`](https://togithub.com/open-telemetry/opentelemetry-go/commit/dc46fd2) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5538](https://togithub.com/open-telemetry/opentelemetry-go/pull/5538) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`dc46fd2`](https://togithub.com/open-telemetry/opentelemetry-go/commit/dc46fd2) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5539](https://togithub.com/open-telemetry/opentelemetry-go/pull/5539) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.103.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5540](https://togithub.com/open-telemetry/opentelemetry-go/pull/5540) - Decouple codecov upload from coverage testing by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5534](https://togithub.com/open-telemetry/opentelemetry-go/pull/5534) - Add errorlint linter by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5535](https://togithub.com/open-telemetry/opentelemetry-go/pull/5535) - Add WithHeaders option for Zipkin exporter by [@​srijan-27](https://togithub.com/srijan-27) in [https://github.com/open-telemetry/opentelemetry-go/pull/5530](https://togithub.com/open-telemetry/opentelemetry-go/pull/5530) - chore(deps): update module github.com/prometheus/common to v0.55.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5552](https://togithub.com/open-telemetry/opentelemetry-go/pull/5552) - Indicate the otlploghttp exporter must be created by the New method by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5521](https://togithub.com/open-telemetry/opentelemetry-go/pull/5521) - sdk/log: Add altering Processor example by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5550](https://togithub.com/open-telemetry/opentelemetry-go/pull/5550) - Split the set and add attributes benchmarks by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5546](https://togithub.com/open-telemetry/opentelemetry-go/pull/5546) - Add walk attributes benchmark by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5547](https://togithub.com/open-telemetry/opentelemetry-go/pull/5547) - Add benchmark retrieving a new logger by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5548](https://togithub.com/open-telemetry/opentelemetry-go/pull/5548) - chore(deps): update jaegertracing/all-in-one docker tag to v1.54 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5555](https://togithub.com/open-telemetry/opentelemetry-go/pull/5555) - chore(deps): update jaegertracing/all-in-one docker tag to v1.58 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5556](https://togithub.com/open-telemetry/opentelemetry-go/pull/5556) - Reduces allocation in attributes by [@​Succo](https://togithub.com/Succo) in [https://github.com/open-telemetry/opentelemetry-go/pull/5549](https://togithub.com/open-telemetry/opentelemetry-go/pull/5549) - Generate `internal/transform` in `otlploggrpc` by [@​XSAM](https://togithub.com/XSAM) in [https://github.com/open-telemetry/opentelemetry-go/pull/5553](https://togithub.com/open-telemetry/opentelemetry-go/pull/5553) - Split the span start/end benchmarks and test start with links and attributes by [@​dmathieu](https://togithub.com/dmathieu) in [https://github.com/open-telemetry/opentelemetry-go/pull/5554](https://togithub.com/open-telemetry/opentelemetry-go/pull/5554) - sdk/log: Fix ExampleProcessor_redact to clone the record by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5559](https://togithub.com/open-telemetry/opentelemetry-go/pull/5559) - sdk/log: Add filtering Processor example by [@​pellared](https://togithub.com/pellared) in [https://github.com/open-telemetry/opentelemetry-go/pull/5543](https://togithub.com/open-telemetry/opentelemetry-go/pull/5543) - chore(deps): update google.golang.org/genproto/googleapis/api digest to [`f6361c8`](https://togithub.com/open-telemetry/opentelemetry-go/commit/f6361c8) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5563](https://togithub.com/open-telemetry/opentelemetry-go/pull/5563) - chore(deps): update google.golang.org/genproto/googleapis/rpc digest to [`f6361c8`](https://togithub.com/open-telemetry/opentelemetry-go/commit/f6361c8) by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5564](https://togithub.com/open-telemetry/opentelemetry-go/pull/5564) - Move time.Now call into exemplar reservoir to improve performance by [@​dashpole](https://togithub.com/dashpole) in [https://github.com/open-telemetry/opentelemetry-go/pull/5545](https://togithub.com/open-telemetry/opentelemetry-go/pull/5545) - chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.104.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/open-telemetry/opentelemetry-go/pull/5565](https://togithub.com/open-telemetry/opentelemetry-go/pull/5565) - Add [@​XSAM](https://togithub.com/XSAM) and [@​dmathieu](https://togithub.com/dmathieu) as repository maintainers by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5558](https://togithub.com/open-telemetry/opentelemetry-go/pull/5558) - Releases v1.28.0/v0.50.0/v0.4.0 by [@​MrAlias](https://togithub.com/MrAlias) in [https://github.com/open-telemetry/opentelemetry-go/pull/5569](https://togithub.com/open-telemetry/opentelemetry-go/pull/5569) #### New Contributors - [@​YHM404](https://togithub.com/YHM404) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5267](https://togithub.com/open-telemetry/opentelemetry-go/pull/5267) - [@​juliusv](https://togithub.com/juliusv) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5506](https://togithub.com/open-telemetry/opentelemetry-go/pull/5506) - [@​fabiobozzo](https://togithub.com/fabiobozzo) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5494](https://togithub.com/open-telemetry/opentelemetry-go/pull/5494) - [@​Charlie-lizhihan](https://togithub.com/Charlie-lizhihan) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5514](https://togithub.com/open-telemetry/opentelemetry-go/pull/5514) - [@​bagmeg](https://togithub.com/bagmeg) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5492](https://togithub.com/open-telemetry/opentelemetry-go/pull/5492) - [@​pyohannes](https://togithub.com/pyohannes) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5520](https://togithub.com/open-telemetry/opentelemetry-go/pull/5520) - [@​srijan-27](https://togithub.com/srijan-27) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5530](https://togithub.com/open-telemetry/opentelemetry-go/pull/5530) - [@​Succo](https://togithub.com/Succo) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/5549](https://togithub.com/open-telemetry/opentelemetry-go/pull/5549) **Full Changelog**: https://github.com/open-telemetry/opentelemetry-go/compare/v1.27.0...v1.28.0
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ‘» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- Makefile | 6 +- cmd/tracegen/main.go | 6 +- examples/hotrod/pkg/tracing/init.go | 6 +- .../hotrod/pkg/tracing/rpcmetrics/observer.go | 4 +- .../pkg/tracing/rpcmetrics/observer_test.go | 8 +-- examples/hotrod/services/customer/database.go | 4 +- go.mod | 30 +++++----- go.sum | 56 +++++++++---------- model/adjuster/otel_tag.go | 10 ++-- model/adjuster/otel_tag_test.go | 17 ++++-- pkg/jtracer/jtracer.go | 7 ++- pkg/otelsemconv/empty_test.go | 14 +++++ pkg/otelsemconv/semconv.go | 29 ++++++++++ .../metrics/prometheus/metricsstore/reader.go | 6 +- plugin/storage/cassandra/spanstore/reader.go | 6 +- 15 files changed, 131 insertions(+), 78 deletions(-) create mode 100644 pkg/otelsemconv/empty_test.go create mode 100644 pkg/otelsemconv/semconv.go diff --git a/Makefile b/Makefile index b4d181e2e2c..eaf9228b29b 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ goleak: @scripts/check-goleak-files.sh $(ALL_PKGS) .PHONY: fmt -fmt: +fmt: $(GOFUMPT) @echo Running import-order-cleanup on ALL_SRC ... @./scripts/import-order-cleanup.py -o inplace -t $(ALL_SRC) @echo Running gofmt on ALL_SRC ... @@ -188,13 +188,13 @@ fmt: @./scripts/updateLicense.py $(ALL_SRC) .PHONY: lint -lint: goleak - $(LINT) -v run +lint: $(LINT) goleak @./scripts/updateLicense.py $(ALL_SRC) > $(FMT_LOG) @./scripts/import-order-cleanup.py -o stdout -t $(ALL_SRC) > $(IMPORT_LOG) @[ ! -s "$(FMT_LOG)" -a ! -s "$(IMPORT_LOG)" ] || (echo "License check or import ordering failures, run 'make fmt'" | cat - $(FMT_LOG) $(IMPORT_LOG) && false) ./scripts/check-semconv-version.sh ./scripts/check-go-version.sh + $(LINT) -v run .PHONY: build-examples build-examples: diff --git a/cmd/tracegen/main.go b/cmd/tracegen/main.go index 7d0c49c2eef..30b70411078 100644 --- a/cmd/tracegen/main.go +++ b/cmd/tracegen/main.go @@ -29,13 +29,13 @@ import ( "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "go.uber.org/zap/zapcore" "github.com/jaegertracing/jaeger/internal/jaegerclientenv2otel" "github.com/jaegertracing/jaeger/internal/tracegen" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" "github.com/jaegertracing/jaeger/pkg/version" ) @@ -84,8 +84,8 @@ func createTracers(cfg *tracegen.Config, logger *zap.Logger) ([]trace.Tracer, fu res, err := resource.New( context.Background(), - resource.WithSchemaURL(semconv.SchemaURL), - resource.WithAttributes(semconv.ServiceNameKey.String(svc)), + resource.WithSchemaURL(otelsemconv.SchemaURL), + resource.WithAttributes(otelsemconv.ServiceNameKey.String(svc)), resource.WithTelemetrySDK(), resource.WithHost(), resource.WithOSType(), diff --git a/examples/hotrod/pkg/tracing/init.go b/examples/hotrod/pkg/tracing/init.go index 994cb22dddb..a4a07ccebdd 100644 --- a/examples/hotrod/pkg/tracing/init.go +++ b/examples/hotrod/pkg/tracing/init.go @@ -31,13 +31,13 @@ import ( "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "github.com/jaegertracing/jaeger/examples/hotrod/pkg/log" "github.com/jaegertracing/jaeger/examples/hotrod/pkg/tracing/rpcmetrics" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) var once sync.Once @@ -62,8 +62,8 @@ func InitOTEL(serviceName string, exporterType string, metricsFactory metrics.Fa res, err := resource.New( context.Background(), - resource.WithSchemaURL(semconv.SchemaURL), - resource.WithAttributes(semconv.ServiceNameKey.String(serviceName)), + resource.WithSchemaURL(otelsemconv.SchemaURL), + resource.WithAttributes(otelsemconv.ServiceNameKey.String(serviceName)), resource.WithTelemetrySDK(), resource.WithHost(), resource.WithOSType(), diff --git a/examples/hotrod/pkg/tracing/rpcmetrics/observer.go b/examples/hotrod/pkg/tracing/rpcmetrics/observer.go index 0b3702b53c5..3035993620d 100644 --- a/examples/hotrod/pkg/tracing/rpcmetrics/observer.go +++ b/examples/hotrod/pkg/tracing/rpcmetrics/observer.go @@ -22,10 +22,10 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) const defaultMaxNumberOfEndpoints = 200 @@ -70,7 +70,7 @@ func (o *Observer) OnEnd(sp sdktrace.ReadOnlySpan) { mets.RequestLatencySuccess.Record(latency) } for _, attr := range sp.Attributes() { - if string(attr.Key) == string(semconv.HTTPResponseStatusCodeKey) { + if string(attr.Key) == string(otelsemconv.HTTPResponseStatusCodeKey) { if attr.Value.Type() == attribute.INT64 { mets.recordHTTPStatusCode(attr.Value.AsInt64()) } else if attr.Value.Type() == attribute.STRING { diff --git a/examples/hotrod/pkg/tracing/rpcmetrics/observer_test.go b/examples/hotrod/pkg/tracing/rpcmetrics/observer_test.go index 27fbb84722e..59af4e665b5 100644 --- a/examples/hotrod/pkg/tracing/rpcmetrics/observer_test.go +++ b/examples/hotrod/pkg/tracing/rpcmetrics/observer_test.go @@ -26,10 +26,10 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" u "github.com/jaegertracing/jaeger/internal/metricstest" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) type testTracer struct { @@ -45,8 +45,8 @@ func withTestTracer(runTest func(tt *testTracer)) { tp := sdktrace.NewTracerProvider( sdktrace.WithSpanProcessor(observer), sdktrace.WithResource(resource.NewWithAttributes( - semconv.SchemaURL, - semconv.ServiceNameKey.String("test"), + otelsemconv.SchemaURL, + otelsemconv.ServiceNameKey.String("test"), )), ) runTest(&testTracer{ @@ -120,7 +120,7 @@ func TestTags(t *testing.T) { for i := 200; i <= 500; i += 100 { testCases = append(testCases, tagTestCase{ - attr: semconv.HTTPResponseStatusCode(i), + attr: otelsemconv.HTTPResponseStatusCode(i), metrics: []u.ExpectedMetric{ {Name: "http_requests", Value: 1, Tags: tags("status_code", fmt.Sprintf("%dxx", i/100))}, }, diff --git a/examples/hotrod/services/customer/database.go b/examples/hotrod/services/customer/database.go index 67247a11de0..41c6e9a9f48 100644 --- a/examples/hotrod/services/customer/database.go +++ b/examples/hotrod/services/customer/database.go @@ -21,7 +21,6 @@ import ( "fmt" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" @@ -29,6 +28,7 @@ import ( "github.com/jaegertracing/jaeger/examples/hotrod/pkg/log" "github.com/jaegertracing/jaeger/examples/hotrod/pkg/tracing" "github.com/jaegertracing/jaeger/examples/hotrod/services/config" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) // database simulates Customer repository implemented on top of an SQL database @@ -77,7 +77,7 @@ func (d *database) Get(ctx context.Context, customerID int) (*Customer, error) { ctx, span := d.tracer.Start(ctx, "SQL SELECT", trace.WithSpanKind(trace.SpanKindClient)) span.SetAttributes( - semconv.PeerServiceKey.String("mysql"), + otelsemconv.PeerServiceKey.String("mysql"), attribute. Key("sql.query"). String(fmt.Sprintf("SELECT * FROM customer WHERE customer_id=%d", customerID)), diff --git a/go.mod b/go.mod index a51b073074f..7740259e468 100644 --- a/go.mod +++ b/go.mod @@ -40,6 +40,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/xdg-go/scram v1.1.2 go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/config/configauth v0.104.0 go.opentelemetry.io/collector/config/configgrpc v0.104.0 go.opentelemetry.io/collector/config/confighttp v0.104.0 go.opentelemetry.io/collector/config/configretry v1.11.0 @@ -69,14 +70,16 @@ require ( go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/sdk v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 + go.opentelemetry.io/otel/exporters/prometheus v0.50.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 go.uber.org/automaxprocs v1.5.3 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -102,7 +105,7 @@ require ( github.com/eapache/queue v1.1.0 // indirect github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect @@ -187,7 +190,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.104.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.104.0 go.opentelemetry.io/collector/config/configcompression v1.11.0 // indirect go.opentelemetry.io/collector/config/confignet v0.104.0 // indirect go.opentelemetry.io/collector/config/configopaque v1.11.0 // indirect @@ -204,18 +206,16 @@ require ( go.opentelemetry.io/otel/bridge/opencensus v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.49.0 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.27.0 - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/text v0.16.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index d19ce3ecf4e..ae3a62df84b 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -491,36 +491,36 @@ go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= -go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bEkIYOVMw4q1WJxIAGoFTrtYOzWuRQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= @@ -657,10 +657,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= -google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/model/adjuster/otel_tag.go b/model/adjuster/otel_tag.go index 6e32a12ce81..18b5714bdd9 100644 --- a/model/adjuster/otel_tag.go +++ b/model/adjuster/otel_tag.go @@ -15,14 +15,16 @@ package adjuster import ( - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" - "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) var otelLibraryKeys = map[string]struct{}{ - string(semconv.OTelLibraryNameKey): {}, - string(semconv.OTelLibraryVersionKey): {}, + string(otelsemconv.TelemetrySDKLanguageKey): {}, + string(otelsemconv.TelemetrySDKNameKey): {}, + string(otelsemconv.TelemetrySDKVersionKey): {}, + string(otelsemconv.TelemetryDistroNameKey): {}, + string(otelsemconv.TelemetryDistroVersionKey): {}, } func OTelTagAdjuster() Adjuster { diff --git a/model/adjuster/otel_tag_test.go b/model/adjuster/otel_tag_test.go index 95bd37333ca..02e50104640 100644 --- a/model/adjuster/otel_tag_test.go +++ b/model/adjuster/otel_tag_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) func TestOTelTagAdjuster(t *testing.T) { @@ -35,8 +35,12 @@ func TestOTelTagAdjuster(t *testing.T) { span: &model.Span{ Tags: model.KeyValues{ model.String("random_key", "random_value"), - model.String(string(semconv.OTelLibraryNameKey), "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"), - model.String(string(semconv.OTelLibraryVersionKey), "0.45.0"), + model.String(string(otelsemconv.TelemetrySDKLanguageKey), "Go"), + model.String(string(otelsemconv.TelemetrySDKNameKey), "opentelemetry"), + model.String(string(otelsemconv.TelemetrySDKVersionKey), "1.27.0"), + // distro attrs intentionally after SDK attrs to test sorting + model.String(string(otelsemconv.TelemetryDistroNameKey), "opentelemetry"), + model.String(string(otelsemconv.TelemetryDistroVersionKey), "blah"), model.String("another_key", "another_value"), }, Process: &model.Process{ @@ -50,8 +54,11 @@ func TestOTelTagAdjuster(t *testing.T) { }, Process: &model.Process{ Tags: model.KeyValues{ - model.String(string(semconv.OTelLibraryNameKey), "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"), - model.String(string(semconv.OTelLibraryVersionKey), "0.45.0"), + model.String(string(otelsemconv.TelemetryDistroNameKey), "opentelemetry"), + model.String(string(otelsemconv.TelemetryDistroVersionKey), "blah"), + model.String(string(otelsemconv.TelemetrySDKLanguageKey), "Go"), + model.String(string(otelsemconv.TelemetrySDKNameKey), "opentelemetry"), + model.String(string(otelsemconv.TelemetrySDKVersionKey), "1.27.0"), }, }, }, diff --git a/pkg/jtracer/jtracer.go b/pkg/jtracer/jtracer.go index f8329ba0e29..21e637d042d 100644 --- a/pkg/jtracer/jtracer.go +++ b/pkg/jtracer/jtracer.go @@ -24,9 +24,10 @@ import ( "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" nooptrace "go.opentelemetry.io/otel/trace/noop" + + "github.com/jaegertracing/jaeger/pkg/otelsemconv" ) type JTracer struct { @@ -110,8 +111,8 @@ func initHelper( func otelResource(ctx context.Context, svc string) (*resource.Resource, error) { return resource.New( ctx, - resource.WithSchemaURL(semconv.SchemaURL), - resource.WithAttributes(semconv.ServiceNameKey.String(svc)), + resource.WithSchemaURL(otelsemconv.SchemaURL), + resource.WithAttributes(otelsemconv.ServiceNameKey.String(svc)), resource.WithTelemetrySDK(), resource.WithHost(), resource.WithOSType(), diff --git a/pkg/otelsemconv/empty_test.go b/pkg/otelsemconv/empty_test.go new file mode 100644 index 00000000000..c172ec0a46d --- /dev/null +++ b/pkg/otelsemconv/empty_test.go @@ -0,0 +1,14 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelsemconv + +import ( + "testing" + + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} diff --git a/pkg/otelsemconv/semconv.go b/pkg/otelsemconv/semconv.go new file mode 100644 index 00000000000..9acb3b88e2c --- /dev/null +++ b/pkg/otelsemconv/semconv.go @@ -0,0 +1,29 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package otelsemconv + +import ( + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" +) + +// We do not use a lot of semconv constants, and its annoying to keep +// the semver of the imports the same. This package serves as a +// one stop shop replacement / alias. +const ( + SchemaURL = semconv.SchemaURL + + TelemetrySDKLanguageKey = semconv.TelemetrySDKLanguageKey + TelemetrySDKNameKey = semconv.TelemetrySDKNameKey + TelemetrySDKVersionKey = semconv.TelemetrySDKVersionKey + TelemetryDistroNameKey = semconv.TelemetryDistroNameKey + TelemetryDistroVersionKey = semconv.TelemetryDistroVersionKey + + ServiceNameKey = semconv.ServiceNameKey + DBQueryTextKey = semconv.DBQueryTextKey + DBSystemKey = semconv.DBSystemKey + PeerServiceKey = semconv.PeerServiceKey + HTTPResponseStatusCodeKey = semconv.HTTPResponseStatusCodeKey +) + +var HTTPResponseStatusCode = semconv.HTTPResponseStatusCode diff --git a/plugin/metrics/prometheus/metricsstore/reader.go b/plugin/metrics/prometheus/metricsstore/reader.go index e65c97edbdc..c91b68fec57 100644 --- a/plugin/metrics/prometheus/metricsstore/reader.go +++ b/plugin/metrics/prometheus/metricsstore/reader.go @@ -30,11 +30,11 @@ import ( promapi "github.com/prometheus/client_golang/api/prometheus/v1" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "github.com/jaegertracing/jaeger/pkg/bearertoken" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" "github.com/jaegertracing/jaeger/pkg/prometheus/config" "github.com/jaegertracing/jaeger/plugin/metrics/prometheus/metricsstore/dbmodel" "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics" @@ -314,8 +314,8 @@ func promqlDurationString(d *time.Duration) string { func startSpanForQuery(ctx context.Context, metricName, query string, tp trace.Tracer) (context.Context, trace.Span) { ctx, span := tp.Start(ctx, metricName) span.SetAttributes( - attribute.Key(semconv.DBStatementKey).String(query), - attribute.Key(semconv.DBSystemKey).String("prometheus"), + attribute.Key(otelsemconv.DBQueryTextKey).String(query), + attribute.Key(otelsemconv.DBSystemKey).String("prometheus"), attribute.Key("component").String("promql"), ) return ctx, span diff --git a/plugin/storage/cassandra/spanstore/reader.go b/plugin/storage/cassandra/spanstore/reader.go index 7ef2f23250f..66e279dff2a 100644 --- a/plugin/storage/cassandra/spanstore/reader.go +++ b/plugin/storage/cassandra/spanstore/reader.go @@ -23,7 +23,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" @@ -31,6 +30,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/cassandra" casMetrics "github.com/jaegertracing/jaeger/pkg/cassandra/metrics" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/otelsemconv" "github.com/jaegertracing/jaeger/plugin/storage/cassandra/spanstore/dbmodel" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -430,8 +430,8 @@ func (s *SpanReader) executeQuery(span trace.Span, query cassandra.Query, tableM func (s *SpanReader) startSpanForQuery(ctx context.Context, name, query string) (context.Context, trace.Span) { ctx, span := s.tracer.Start(ctx, name) span.SetAttributes( - attribute.Key(semconv.DBStatementKey).String(query), - attribute.Key(semconv.DBSystemKey).String("cassandra"), + attribute.Key(otelsemconv.DBQueryTextKey).String(query), + attribute.Key(otelsemconv.DBSystemKey).String("cassandra"), attribute.Key("component").String("gocql"), ) return ctx, span From 63ff684b98e1cf808208ec45179ab7e039a6c4c1 Mon Sep 17 00:00:00 2001 From: Raghuram Kannan <78465537+FlamingSaint@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:03:15 +0530 Subject: [PATCH 13/52] Upgrade Microsim to v0.4.1 (#5702) --- docker-compose/monitor/docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose/monitor/docker-compose.yml b/docker-compose/monitor/docker-compose.yml index cc98b4da785..61e9170148c 100644 --- a/docker-compose/monitor/docker-compose.yml +++ b/docker-compose/monitor/docker-compose.yml @@ -29,8 +29,11 @@ services: microsim: networks: - backend - image: yurishkuro/microsim:0.3.0 - command: "-j http://otel_collector:14278/api/traces -d 24h -s 500ms" + image: yurishkuro/microsim:v0.4.1 + command: "-d 24h -s 500ms" + environment: + - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel_collector:4318 + - OTEL_EXPORTER_OTLP_INSECURE=true depends_on: - otel_collector prometheus: From 42bffdfa70a42bc6a7d2ea9e0c52732f688d8ecf Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 3 Jul 2024 17:04:45 +0200 Subject: [PATCH 14/52] Update docker/setup-qemu-action action to v3.1.0 (#5705) --- .github/workflows/ci-all-in-one-build.yml | 2 +- .github/workflows/ci-crossdock.yml | 2 +- .github/workflows/ci-docker-build.yml | 2 +- .github/workflows/ci-elasticsearch.yml | 2 +- .github/workflows/ci-hotrod.yml | 2 +- .github/workflows/ci-opensearch.yml | 2 +- .github/workflows/ci-release-testing.yml | 2 +- .github/workflows/ci-release.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-all-in-one-build.yml b/.github/workflows/ci-all-in-one-build.yml index beec87f5254..c8e0dd71745 100644 --- a/.github/workflows/ci-all-in-one-build.yml +++ b/.github/workflows/ci-all-in-one-build.yml @@ -55,7 +55,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Define BUILD_FLAGS var if running on a Pull Request run: | diff --git a/.github/workflows/ci-crossdock.yml b/.github/workflows/ci-crossdock.yml index 584bf1d9d8e..26f28d87446 100644 --- a/.github/workflows/ci-crossdock.yml +++ b/.github/workflows/ci-crossdock.yml @@ -43,7 +43,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Build, test, and publish crossdock image run: bash scripts/build-crossdock.sh diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml index 9f0afa50b43..160c6d156f9 100644 --- a/.github/workflows/ci-docker-build.yml +++ b/.github/workflows/ci-docker-build.yml @@ -46,7 +46,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Build only linux/amd64 container images for a Pull Request if: github.ref_name != 'main' diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 108bea334db..5063608814c 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -53,7 +53,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Run ${{ matrix.version.distribution }} integration tests id: test-execution run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.version.jaeger }} diff --git a/.github/workflows/ci-hotrod.yml b/.github/workflows/ci-hotrod.yml index 98060ffe53d..32474c2cab0 100644 --- a/.github/workflows/ci-hotrod.yml +++ b/.github/workflows/ci-hotrod.yml @@ -42,7 +42,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Build, test, and publish hotrod image run: bash scripts/hotrod-integration-test.sh diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-opensearch.yml index c9185f6d0e2..5e8a2b34974 100644 --- a/.github/workflows/ci-opensearch.yml +++ b/.github/workflows/ci-opensearch.yml @@ -53,7 +53,7 @@ jobs: - name: Install tools run: make install-ci - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Run ${{ matrix.version.distribution }} integration tests id: test-execution diff --git a/.github/workflows/ci-release-testing.yml b/.github/workflows/ci-release-testing.yml index 79301cdc312..985485ca055 100644 --- a/.github/workflows/ci-release-testing.yml +++ b/.github/workflows/ci-release-testing.yml @@ -67,7 +67,7 @@ jobs: id: package-binaries run: bash scripts/package-deploy.sh - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Build all container images (do not push) run: bash scripts/build-upload-docker-images.sh -l diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 537d4389a51..8390a918f52 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -91,7 +91,7 @@ jobs: rm -rf deploy || true df -h / - - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Build and upload all container images run: bash scripts/build-upload-docker-images.sh From b39252c1e829987e232ddada28c85ce6ab0ea49f Mon Sep 17 00:00:00 2001 From: mehul gautam Date: Wed, 3 Jul 2024 22:10:30 +0530 Subject: [PATCH 15/52] Increase codecov of pkg/kafka (#5682) ## Which problem is this PR solving? - https://github.com/jaegertracing/jaeger/issues/5068 ## Description of the changes - added test case for ` pkg/kafka/auth/config.go` and updated `internal/tracegen/worker_test.go` ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: mehul gautam Signed-off-by: mehul gautam Co-authored-by: mehul gautam Co-authored-by: Yuri Shkuro --- internal/tracegen/worker_test.go | 63 +++++++---- pkg/kafka/auth/config_test.go | 174 ++++++++++++++++++++++++++++++ pkg/kafka/auth/kerberos_test.go | 68 ++++++++++++ pkg/kafka/auth/plaintext_test.go | 100 +++++++++++++++++ pkg/kafka/auth/tls_test.go | 28 +++++ pkg/kafka/consumer/config_test.go | 20 ++++ pkg/kafka/producer/config_test.go | 20 ++++ 7 files changed, 450 insertions(+), 23 deletions(-) create mode 100644 pkg/kafka/auth/config_test.go create mode 100644 pkg/kafka/auth/kerberos_test.go create mode 100644 pkg/kafka/auth/plaintext_test.go create mode 100644 pkg/kafka/auth/tls_test.go create mode 100644 pkg/kafka/consumer/config_test.go create mode 100644 pkg/kafka/producer/config_test.go diff --git a/internal/tracegen/worker_test.go b/internal/tracegen/worker_test.go index 764ebfd54a5..557e8060cbe 100644 --- a/internal/tracegen/worker_test.go +++ b/internal/tracegen/worker_test.go @@ -16,30 +16,47 @@ import ( ) func Test_SimulateTraces(t *testing.T) { - logger, buf := testutils.NewLogger() - tp := sdktrace.NewTracerProvider() - tracers := []trace.Tracer{tp.Tracer("stdout")} - wg := sync.WaitGroup{} - wg.Add(1) - var running uint32 = 1 - - worker := &worker{ - logger: logger, - tracers: tracers, - wg: &wg, - id: 7, - running: &running, - Config: Config{ - Traces: 7, - Duration: time.Second, - Pause: time.Second, - Service: "stdout", - Debug: true, - Firehose: true, + tests := []struct { + name string + pause time.Duration + }{ + { + name: "no pause", + pause: 0, + }, + { + name: "with pause", + pause: time.Second, }, } - expectedOutput := `{"level":"info","msg":"Worker 7 generated 7 traces"}` + "\n" - worker.simulateTraces() - assert.Equal(t, expectedOutput, buf.String()) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + logger, buf := testutils.NewLogger() + tp := sdktrace.NewTracerProvider() + tracers := []trace.Tracer{tp.Tracer("stdout")} + wg := sync.WaitGroup{} + wg.Add(1) + var running uint32 = 1 + worker := &worker{ + logger: logger, + tracers: tracers, + wg: &wg, + id: 7, + running: &running, + Config: Config{ + Traces: 7, + Duration: time.Second, + Pause: tt.pause, + Service: "stdout", + Debug: true, + Firehose: true, + ChildSpans: 1, + }, + } + expectedOutput := `{"level":"info","msg":"Worker 7 generated 7 traces"}` + "\n" + worker.simulateTraces() + assert.Equal(t, expectedOutput, buf.String()) + }) + } } diff --git a/pkg/kafka/auth/config_test.go b/pkg/kafka/auth/config_test.go new file mode 100644 index 00000000000..a32b0077c02 --- /dev/null +++ b/pkg/kafka/auth/config_test.go @@ -0,0 +1,174 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package auth + +import ( + "flag" + "testing" + + "github.com/Shopify/sarama" + "github.com/spf13/viper" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" + + "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/pkg/config/tlscfg" +) + +func addFlags(flags *flag.FlagSet) { + configPrefix := "kafka.auth" + AddFlags(configPrefix, flags) +} + +func Test_InitFromViper(t *testing.T) { + configPrefix := "kafka.auth" + v, command := config.Viperize(addFlags) + command.ParseFlags([]string{ + "--kafka.auth.authentication=tls", + "--kafka.auth.kerberos.service-name=kafka", + "--kafka.auth.kerberos.realm=EXAMPLE.COM", + "--kafka.auth.kerberos.use-keytab=true", + "--kafka.auth.kerberos.username=user", + "--kafka.auth.kerberos.password=password", + "--kafka.auth.kerberos.config-file=/path/to/krb5.conf", + "--kafka.auth.kerberos.keytab-file=/path/to/keytab", + "--kafka.auth.kerberos.disable-fast-negotiation=true", + "--kafka.auth.tls.enabled=false", + "--kafka.auth.plaintext.username=user", + "--kafka.auth.plaintext.password=password", + "--kafka.auth.plaintext.mechanism=SCRAM-SHA-256", + "--kafka.auth.tls.ca=failing", + }) + + authConfig := &AuthenticationConfig{} + err := authConfig.InitFromViper(configPrefix, v) + require.EqualError(t, err, "failed to process Kafka TLS options: kafka.auth.tls.* options cannot be used when kafka.auth.tls.enabled is false") + + command.ParseFlags([]string{"--kafka.auth.tls.ca="}) + v.BindPFlags(command.Flags()) + err = authConfig.InitFromViper(configPrefix, v) + require.NoError(t, err) + + expectedConfig := &AuthenticationConfig{ + Authentication: "tls", + Kerberos: KerberosConfig{ + ServiceName: "kafka", + Realm: "EXAMPLE.COM", + UseKeyTab: true, + Username: "user", + Password: "password", + ConfigPath: "/path/to/krb5.conf", + KeyTabPath: "/path/to/keytab", + DisablePAFXFast: true, + }, + TLS: tlscfg.Options{ + Enabled: true, + }, + PlainText: PlainTextConfig{ + Username: "user", + Password: "password", + Mechanism: "SCRAM-SHA-256", + }, + } + assert.Equal(t, expectedConfig, authConfig) +} + +// Test plaintext with different mechanisms +func testPlaintext(v *viper.Viper, t *testing.T, configPrefix string, logger *zap.Logger, mechanism string, saramaConfig *sarama.Config) { + v.Set(configPrefix+plainTextPrefix+suffixPlainTextMechanism, mechanism) + authConfig := &AuthenticationConfig{} + err := authConfig.InitFromViper(configPrefix, v) + require.NoError(t, err) + require.NoError(t, authConfig.SetConfiguration(saramaConfig, logger)) +} + +func TestSetConfiguration(t *testing.T) { + logger := zaptest.NewLogger(t) + saramaConfig := sarama.NewConfig() + configPrefix := "kafka.auth" + v, command := config.Viperize(addFlags) + + // Table-driven test cases + tests := []struct { + name string + authType string + expectedError string + plainTextMechanisms []string + }{ + { + name: "Invalid authentication method", + authType: "fail", + expectedError: "Unknown/Unsupported authentication method fail to kafka cluster", + }, + { + name: "Kerberos authentication", + authType: "kerberos", + expectedError: "", + }, + { + name: "Plaintext authentication with SCRAM-SHA-256", + authType: "plaintext", + expectedError: "", + plainTextMechanisms: []string{"SCRAM-SHA-256"}, + }, + { + name: "Plaintext authentication with SCRAM-SHA-512", + authType: "plaintext", + expectedError: "", + plainTextMechanisms: []string{"SCRAM-SHA-512"}, + }, + { + name: "Plaintext authentication with PLAIN", + authType: "plaintext", + expectedError: "", + plainTextMechanisms: []string{"PLAIN"}, + }, + { + name: "No authentication", + authType: " ", + expectedError: "", + }, + { + name: "TLS authentication", + authType: "tls", + expectedError: "", + }, + { + name: "TLS authentication with invalid cipher suite", + authType: "tls", + expectedError: "error loading tls config: failed to get cipher suite ids from cipher suite names: cipher suite fail not supported or doesn't exist", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + command.ParseFlags([]string{ + "--kafka.auth.authentication=" + tt.authType, + }) + authConfig := &AuthenticationConfig{} + defer authConfig.TLS.Close() + err := authConfig.InitFromViper(configPrefix, v) + require.NoError(t, err) + + if tt.authType == "tls" && tt.expectedError != "" { + authConfig.TLS.CipherSuites = []string{"fail"} + } + + if len(tt.plainTextMechanisms) > 0 { + for _, mechanism := range tt.plainTextMechanisms { + testPlaintext(v, t, configPrefix, logger, mechanism, saramaConfig) + } + } else { + err = authConfig.SetConfiguration(saramaConfig, logger) + if tt.expectedError != "" { + require.EqualError(t, err, tt.expectedError) + } else { + require.NoError(t, err) + } + } + }) + } +} diff --git a/pkg/kafka/auth/kerberos_test.go b/pkg/kafka/auth/kerberos_test.go new file mode 100644 index 00000000000..a86a250c8f0 --- /dev/null +++ b/pkg/kafka/auth/kerberos_test.go @@ -0,0 +1,68 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package auth + +import ( + "testing" + + "github.com/Shopify/sarama" + "github.com/stretchr/testify/assert" +) + +func TestSetKerberosConfiguration(t *testing.T) { + tests := []struct { + name string + config KerberosConfig + }{ + { + name: "With KeyTab", + config: KerberosConfig{ + ServiceName: "service", + Realm: "realm", + UseKeyTab: true, + Username: "username", + Password: "password", + ConfigPath: "/path/to/config", + KeyTabPath: "/path/to/keytab", + DisablePAFXFast: true, + }, + }, + { + name: "Without KeyTab", + config: KerberosConfig{ + ServiceName: "service", + Realm: "realm", + UseKeyTab: false, + Username: "username", + Password: "password", + ConfigPath: "/path/to/config", + DisablePAFXFast: false, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + saramaConfig := sarama.NewConfig() + + setKerberosConfiguration(&tt.config, saramaConfig) + + assert.Equal(t, sarama.SASLMechanism("GSSAPI"), saramaConfig.Net.SASL.Mechanism) + assert.True(t, saramaConfig.Net.SASL.Enable) + assert.Equal(t, tt.config.Username, saramaConfig.Net.SASL.GSSAPI.Username) + assert.Equal(t, tt.config.Realm, saramaConfig.Net.SASL.GSSAPI.Realm) + assert.Equal(t, tt.config.ServiceName, saramaConfig.Net.SASL.GSSAPI.ServiceName) + assert.Equal(t, tt.config.DisablePAFXFast, saramaConfig.Net.SASL.GSSAPI.DisablePAFXFAST) + assert.Equal(t, tt.config.ConfigPath, saramaConfig.Net.SASL.GSSAPI.KerberosConfigPath) + + if tt.config.UseKeyTab { + assert.Equal(t, tt.config.KeyTabPath, saramaConfig.Net.SASL.GSSAPI.KeyTabPath) + assert.Equal(t, sarama.KRB5_KEYTAB_AUTH, saramaConfig.Net.SASL.GSSAPI.AuthType) + } else { + assert.Equal(t, tt.config.Password, saramaConfig.Net.SASL.GSSAPI.Password) + assert.Equal(t, sarama.KRB5_USER_AUTH, saramaConfig.Net.SASL.GSSAPI.AuthType) + } + }) + } +} diff --git a/pkg/kafka/auth/plaintext_test.go b/pkg/kafka/auth/plaintext_test.go new file mode 100644 index 00000000000..623d579d5e9 --- /dev/null +++ b/pkg/kafka/auth/plaintext_test.go @@ -0,0 +1,100 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package auth + +import ( + "fmt" + "strings" + "testing" + + "github.com/Shopify/sarama" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/xdg-go/scram" +) + +func TestScramClient(t *testing.T) { + scramClientFunc := clientGenFunc(scram.SHA256) + client := scramClientFunc().(*scramClient) + + err := client.Begin("testUser", "testPassword", "testAuthzID") + require.NoError(t, err, "Begin should not return an error") + assert.NotNil(t, client.Client, "Client should be initialized") + assert.NotNil(t, client.ClientConversation, "ClientConversation should be initialized") + + step, err := client.Step("testChallenge") + require.NoError(t, err, "Step should not return an error") + require.NotEmpty(t, step, "Step should return a non-empty response") + + done := client.Done() + assert.False(t, done, "Done should return false initially") +} + +func TestSetPlainTextConfiguration(t *testing.T) { + tests := []struct { + config PlainTextConfig + expectedError error + expectedMechanism sarama.SASLMechanism + }{ + { + config: PlainTextConfig{ + Username: "username", + Password: "password", + Mechanism: "SCRAM-SHA-256", + }, + expectedError: nil, + expectedMechanism: sarama.SASLTypeSCRAMSHA256, + }, + { + config: PlainTextConfig{ + Username: "username", + Password: "password", + Mechanism: "SCRAM-SHA-512", + }, + expectedError: nil, + expectedMechanism: sarama.SASLTypeSCRAMSHA512, + }, + { + config: PlainTextConfig{ + Username: "username", + Password: "password", + Mechanism: "PLAIN", + }, + expectedError: nil, + expectedMechanism: sarama.SASLTypePlaintext, + }, + { + config: PlainTextConfig{ + Username: "username", + Password: "password", + Mechanism: "INVALID_MECHANISM", + }, + expectedError: fmt.Errorf("config plaintext.mechanism error: %s, only support 'SCRAM-SHA-256' or 'SCRAM-SHA-512' or 'PLAIN'", "INVALID_MECHANISM"), + }, + } + + for _, tt := range tests { + t.Run(tt.config.Mechanism, func(t *testing.T) { + saramaConfig := sarama.NewConfig() + + err := setPlainTextConfiguration(&tt.config, saramaConfig) + + if tt.expectedError != nil { + assert.EqualError(t, err, tt.expectedError.Error()) + } else { + require.NoError(t, err) + assert.True(t, saramaConfig.Net.SASL.Enable) + assert.Equal(t, tt.config.Username, saramaConfig.Net.SASL.User) + assert.Equal(t, tt.config.Password, saramaConfig.Net.SASL.Password) + assert.Equal(t, tt.expectedMechanism, saramaConfig.Net.SASL.Mechanism) + + if strings.HasPrefix(tt.config.Mechanism, "SCRAM-SHA-") { + assert.NotNil(t, saramaConfig.Net.SASL.SCRAMClientGeneratorFunc) + } else { + assert.Nil(t, saramaConfig.Net.SASL.SCRAMClientGeneratorFunc) + } + } + }) + } +} diff --git a/pkg/kafka/auth/tls_test.go b/pkg/kafka/auth/tls_test.go new file mode 100644 index 00000000000..d8dadf6cd64 --- /dev/null +++ b/pkg/kafka/auth/tls_test.go @@ -0,0 +1,28 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package auth + +import ( + "testing" + + "github.com/Shopify/sarama" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + "github.com/jaegertracing/jaeger/pkg/config/tlscfg" +) + +func TestSetTLSConfiguration(t *testing.T) { + logger := zaptest.NewLogger(t) + saramaConfig := sarama.NewConfig() + tlsConfig := &tlscfg.Options{ + Enabled: true, + } + err := setTLSConfiguration(tlsConfig, saramaConfig, logger) + require.NoError(t, err) + assert.True(t, saramaConfig.Net.TLS.Enable) + assert.NotNil(t, saramaConfig.Net.TLS.Config) + defer tlsConfig.Close() +} diff --git a/pkg/kafka/consumer/config_test.go b/pkg/kafka/consumer/config_test.go new file mode 100644 index 00000000000..563fc9d6d1a --- /dev/null +++ b/pkg/kafka/consumer/config_test.go @@ -0,0 +1,20 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package consumer + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + "github.com/jaegertracing/jaeger/pkg/kafka/auth" +) + +func TestSetConfiguration(t *testing.T) { + logger := zaptest.NewLogger(t) + test := &Configuration{AuthenticationConfig: auth.AuthenticationConfig{Authentication: "fail"}} + _, err := test.NewConsumer(logger) + require.EqualError(t, err, "Unknown/Unsupported authentication method fail to kafka cluster") +} diff --git a/pkg/kafka/producer/config_test.go b/pkg/kafka/producer/config_test.go new file mode 100644 index 00000000000..87bd8631c69 --- /dev/null +++ b/pkg/kafka/producer/config_test.go @@ -0,0 +1,20 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package producer + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + "github.com/jaegertracing/jaeger/pkg/kafka/auth" +) + +func TestSetConfiguration(t *testing.T) { + logger := zaptest.NewLogger(t) + test := &Configuration{AuthenticationConfig: auth.AuthenticationConfig{Authentication: "fail"}} + _, err := test.NewProducer(logger) + require.EqualError(t, err, "Unknown/Unsupported authentication method fail to kafka cluster") +} From 3b9428e616223259454951cf635ce3b892fc8e1e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 3 Jul 2024 19:17:18 +0200 Subject: [PATCH 16/52] Update module go.opentelemetry.io/contrib/instrumentation to v0.53.0 (#5706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | `v0.52.0` -> `v0.53.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.52.0/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcontrib%2finstrumentation%2fgoogle.golang.org%2fgrpc%2fotelgrpc/v0.52.0/v0.53.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- go.mod | 6 +++--- go.sum | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 7740259e468..37d2ca5d3be 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/olivere/elastic v6.2.37+incompatible github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0 @@ -68,8 +69,8 @@ require ( go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0 go.opentelemetry.io/collector/receiver v0.104.0 go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 @@ -150,7 +151,6 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0 // indirect diff --git a/go.sum b/go.sum index ae3a62df84b..23e6f706ee7 100644 --- a/go.sum +++ b/go.sum @@ -483,10 +483,10 @@ go.opentelemetry.io/collector/service v0.104.0 h1:DTpkoX4C6qiA3v3cfB2cHv/cH705o5 go.opentelemetry.io/collector/service v0.104.0/go.mod h1:eq68zgpqRDYaVp60NeRu973J0rA5vZJkezfw/EzxLXc= go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= From f2028800e89955662eaa741a2bfbbda26f7f57ee Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 4 Jul 2024 21:50:01 +0200 Subject: [PATCH 17/52] Add back ESv6 support with e2e test (#5704) Reverts parts of https://github.com/jaegertracing/jaeger/issues/5439 Motivation: some vendors still provide commercial support for ES v6 to customers, even though ESv6 EOL was Nov 2020. --------- Signed-off-by: Pavol Loffay Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- .github/workflows/ci-elasticsearch.yml | 3 + .../elasticsearch/v6/docker-compose.yml | 11 ++ .../fixtures/jaeger-dependencies-6.json | 10 ++ .../mappings/fixtures/jaeger-sampling-6.json | 10 ++ .../mappings/fixtures/jaeger-service-6.json | 49 ++++++ .../es/mappings/fixtures/jaeger-span-6.json | 165 ++++++++++++++++++ .../es/mappings/jaeger-dependencies-6.json | 10 ++ .../es/mappings/jaeger-sampling-6.json | 10 ++ .../storage/es/mappings/jaeger-service-6.json | 49 ++++++ plugin/storage/es/mappings/jaeger-span-6.json | 165 ++++++++++++++++++ plugin/storage/es/mappings/mapping.go | 4 +- plugin/storage/es/mappings/mapping_test.go | 94 ++++++++-- .../storage/integration/elasticsearch_test.go | 2 +- .../integration/es_index_cleaner_test.go | 2 +- 14 files changed, 569 insertions(+), 15 deletions(-) create mode 100644 docker-compose/elasticsearch/v6/docker-compose.yml create mode 100644 plugin/storage/es/mappings/fixtures/jaeger-dependencies-6.json create mode 100644 plugin/storage/es/mappings/fixtures/jaeger-sampling-6.json create mode 100644 plugin/storage/es/mappings/fixtures/jaeger-service-6.json create mode 100644 plugin/storage/es/mappings/fixtures/jaeger-span-6.json create mode 100644 plugin/storage/es/mappings/jaeger-dependencies-6.json create mode 100644 plugin/storage/es/mappings/jaeger-sampling-6.json create mode 100644 plugin/storage/es/mappings/jaeger-service-6.json create mode 100644 plugin/storage/es/mappings/jaeger-span-6.json diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 5063608814c..44a5e0a8532 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -22,6 +22,9 @@ jobs: fail-fast: false matrix: version: + - major: 6.x + distribution: elasticsearch + jaeger: v1 - major: 7.x distribution: elasticsearch jaeger: v1 diff --git a/docker-compose/elasticsearch/v6/docker-compose.yml b/docker-compose/elasticsearch/v6/docker-compose.yml new file mode 100644 index 00000000000..fdce40870e9 --- /dev/null +++ b/docker-compose/elasticsearch/v6/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.8' + +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.23 + environment: + - discovery.type=single-node + - http.host=0.0.0.0 + - transport.host=127.0.0.1 + ports: + - "9200:9200" \ No newline at end of file diff --git a/plugin/storage/es/mappings/fixtures/jaeger-dependencies-6.json b/plugin/storage/es/mappings/fixtures/jaeger-dependencies-6.json new file mode 100644 index 00000000000..42659ac9d03 --- /dev/null +++ b/plugin/storage/es/mappings/fixtures/jaeger-dependencies-6.json @@ -0,0 +1,10 @@ +{ + "template": "*jaeger-dependencies-*", + "settings":{ + "index.number_of_shards": 3, + "index.number_of_replicas": 3, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true + }, + "mappings":{} +} diff --git a/plugin/storage/es/mappings/fixtures/jaeger-sampling-6.json b/plugin/storage/es/mappings/fixtures/jaeger-sampling-6.json new file mode 100644 index 00000000000..87304011017 --- /dev/null +++ b/plugin/storage/es/mappings/fixtures/jaeger-sampling-6.json @@ -0,0 +1,10 @@ +{ + "template": "*jaeger-sampling-*", + "settings":{ + "index.number_of_shards": 3, + "index.number_of_replicas": 3, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true + }, + "mappings":{} +} diff --git a/plugin/storage/es/mappings/fixtures/jaeger-service-6.json b/plugin/storage/es/mappings/fixtures/jaeger-service-6.json new file mode 100644 index 00000000000..9ba447775ed --- /dev/null +++ b/plugin/storage/es/mappings/fixtures/jaeger-service-6.json @@ -0,0 +1,49 @@ +{ + "template": "*jaeger-service-*", + "settings":{ + "index.number_of_shards": 3, + "index.number_of_replicas": 3, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true, + "index.mapper.dynamic":false + }, + "mappings":{ + "_default_":{ + "_all":{ + "enabled":false + }, + "dynamic_templates":[ + { + "span_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"tag.*" + } + }, + { + "process_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"process.tag.*" + } + } + ] + }, + "service":{ + "properties":{ + "serviceName":{ + "type":"keyword", + "ignore_above":256 + }, + "operationName":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } +} diff --git a/plugin/storage/es/mappings/fixtures/jaeger-span-6.json b/plugin/storage/es/mappings/fixtures/jaeger-span-6.json new file mode 100644 index 00000000000..e7a89878009 --- /dev/null +++ b/plugin/storage/es/mappings/fixtures/jaeger-span-6.json @@ -0,0 +1,165 @@ +{ + "template": "*jaeger-span-*", + "settings":{ + "index.number_of_shards": 3, + "index.number_of_replicas": 3, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true, + "index.mapper.dynamic":false + }, + "mappings":{ + "_default_":{ + "_all":{ + "enabled":false + }, + "dynamic_templates":[ + { + "span_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"tag.*" + } + }, + { + "process_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"process.tag.*" + } + } + ] + }, + "span":{ + "properties":{ + "traceID":{ + "type":"keyword", + "ignore_above":256 + }, + "parentSpanID":{ + "type":"keyword", + "ignore_above":256 + }, + "spanID":{ + "type":"keyword", + "ignore_above":256 + }, + "operationName":{ + "type":"keyword", + "ignore_above":256 + }, + "startTime":{ + "type":"long" + }, + "startTimeMillis":{ + "type":"date", + "format":"epoch_millis" + }, + "duration":{ + "type":"long" + }, + "flags":{ + "type":"integer" + }, + "logs":{ + "type":"nested", + "dynamic":false, + "properties":{ + "timestamp":{ + "type":"long" + }, + "fields":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + }, + "process":{ + "properties":{ + "serviceName":{ + "type":"keyword", + "ignore_above":256 + }, + "tag":{ + "type":"object" + }, + "tags":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + }, + "references":{ + "type":"nested", + "dynamic":false, + "properties":{ + "refType":{ + "type":"keyword", + "ignore_above":256 + }, + "traceID":{ + "type":"keyword", + "ignore_above":256 + }, + "spanID":{ + "type":"keyword", + "ignore_above":256 + } + } + }, + "tag":{ + "type":"object" + }, + "tags":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + } + } +} diff --git a/plugin/storage/es/mappings/jaeger-dependencies-6.json b/plugin/storage/es/mappings/jaeger-dependencies-6.json new file mode 100644 index 00000000000..cdfa62d9547 --- /dev/null +++ b/plugin/storage/es/mappings/jaeger-dependencies-6.json @@ -0,0 +1,10 @@ +{ + "template": "*jaeger-dependencies-*", + "settings":{ + "index.number_of_shards": {{ .Shards }}, + "index.number_of_replicas": {{ .Replicas }}, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true + }, + "mappings":{} +} diff --git a/plugin/storage/es/mappings/jaeger-sampling-6.json b/plugin/storage/es/mappings/jaeger-sampling-6.json new file mode 100644 index 00000000000..458d490a357 --- /dev/null +++ b/plugin/storage/es/mappings/jaeger-sampling-6.json @@ -0,0 +1,10 @@ +{ + "template": "*jaeger-sampling-*", + "settings":{ + "index.number_of_shards": {{ .Shards }}, + "index.number_of_replicas": {{ .Replicas }}, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":false + }, + "mappings":{} +} diff --git a/plugin/storage/es/mappings/jaeger-service-6.json b/plugin/storage/es/mappings/jaeger-service-6.json new file mode 100644 index 00000000000..1adb8e0bf38 --- /dev/null +++ b/plugin/storage/es/mappings/jaeger-service-6.json @@ -0,0 +1,49 @@ +{ + "template": "*jaeger-service-*", + "settings":{ + "index.number_of_shards": {{ .Shards }}, + "index.number_of_replicas": {{ .Replicas }}, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true, + "index.mapper.dynamic":false + }, + "mappings":{ + "_default_":{ + "_all":{ + "enabled":false + }, + "dynamic_templates":[ + { + "span_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"tag.*" + } + }, + { + "process_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"process.tag.*" + } + } + ] + }, + "service":{ + "properties":{ + "serviceName":{ + "type":"keyword", + "ignore_above":256 + }, + "operationName":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } +} diff --git a/plugin/storage/es/mappings/jaeger-span-6.json b/plugin/storage/es/mappings/jaeger-span-6.json new file mode 100644 index 00000000000..3c73f923c4c --- /dev/null +++ b/plugin/storage/es/mappings/jaeger-span-6.json @@ -0,0 +1,165 @@ +{ + "template": "*jaeger-span-*", + "settings":{ + "index.number_of_shards": {{ .Shards }}, + "index.number_of_replicas": {{ .Replicas }}, + "index.mapping.nested_fields.limit":50, + "index.requests.cache.enable":true, + "index.mapper.dynamic":false + }, + "mappings":{ + "_default_":{ + "_all":{ + "enabled":false + }, + "dynamic_templates":[ + { + "span_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"tag.*" + } + }, + { + "process_tags_map":{ + "mapping":{ + "type":"keyword", + "ignore_above":256 + }, + "path_match":"process.tag.*" + } + } + ] + }, + "span":{ + "properties":{ + "traceID":{ + "type":"keyword", + "ignore_above":256 + }, + "parentSpanID":{ + "type":"keyword", + "ignore_above":256 + }, + "spanID":{ + "type":"keyword", + "ignore_above":256 + }, + "operationName":{ + "type":"keyword", + "ignore_above":256 + }, + "startTime":{ + "type":"long" + }, + "startTimeMillis":{ + "type":"date", + "format":"epoch_millis" + }, + "duration":{ + "type":"long" + }, + "flags":{ + "type":"integer" + }, + "logs":{ + "type":"nested", + "dynamic":false, + "properties":{ + "timestamp":{ + "type":"long" + }, + "fields":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + }, + "process":{ + "properties":{ + "serviceName":{ + "type":"keyword", + "ignore_above":256 + }, + "tag":{ + "type":"object" + }, + "tags":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + }, + "references":{ + "type":"nested", + "dynamic":false, + "properties":{ + "refType":{ + "type":"keyword", + "ignore_above":256 + }, + "traceID":{ + "type":"keyword", + "ignore_above":256 + }, + "spanID":{ + "type":"keyword", + "ignore_above":256 + } + } + }, + "tag":{ + "type":"object" + }, + "tags":{ + "type":"nested", + "dynamic":false, + "properties":{ + "key":{ + "type":"keyword", + "ignore_above":256 + }, + "value":{ + "type":"keyword", + "ignore_above":256 + }, + "tagType":{ + "type":"keyword", + "ignore_above":256 + } + } + } + } + } + } +} diff --git a/plugin/storage/es/mappings/mapping.go b/plugin/storage/es/mappings/mapping.go index deee2a1cba4..d5da6ccb97f 100644 --- a/plugin/storage/es/mappings/mapping.go +++ b/plugin/storage/es/mappings/mapping.go @@ -46,8 +46,10 @@ type MappingBuilder struct { func (mb *MappingBuilder) GetMapping(mapping string) (string, error) { if mb.EsVersion == 8 { return mb.fixMapping(mapping + "-8.json") + } else if mb.EsVersion == 7 { + return mb.fixMapping(mapping + "-7.json") } - return mb.fixMapping(mapping + "-7.json") + return mb.fixMapping(mapping + "-6.json") } // GetSpanServiceMappings returns span and service mappings diff --git a/plugin/storage/es/mappings/mapping_test.go b/plugin/storage/es/mappings/mapping_test.go index efa56c335bf..a3b35f1dcca 100644 --- a/plugin/storage/es/mappings/mapping_test.go +++ b/plugin/storage/es/mappings/mapping_test.go @@ -35,17 +35,25 @@ import ( //go:embed fixtures/*.json var FIXTURES embed.FS -func TestMappingBuilder_GetMapping(t *testing.T) { +func TestMappingBuilderGetMapping(t *testing.T) { + const ( + jaegerSpan = "jaeger-span" + jaegerService = "jaeger-service" + jaegerDependencies = "jaeger-dependencies" + ) tests := []struct { mapping string esVersion uint }{ - {mapping: "jaeger-span", esVersion: 8}, - {mapping: "jaeger-span", esVersion: 7}, - {mapping: "jaeger-service", esVersion: 8}, - {mapping: "jaeger-service", esVersion: 7}, - {mapping: "jaeger-dependencies", esVersion: 8}, - {mapping: "jaeger-dependencies", esVersion: 7}, + {mapping: jaegerSpan, esVersion: 8}, + {mapping: jaegerSpan, esVersion: 7}, + {mapping: jaegerSpan, esVersion: 6}, + {mapping: jaegerService, esVersion: 8}, + {mapping: jaegerService, esVersion: 7}, + {mapping: jaegerService, esVersion: 6}, + {mapping: jaegerDependencies, esVersion: 8}, + {mapping: jaegerDependencies, esVersion: 7}, + {mapping: jaegerDependencies, esVersion: 6}, } for _, tt := range tests { t.Run(tt.mapping, func(t *testing.T) { @@ -73,14 +81,17 @@ func TestMappingBuilder_GetMapping(t *testing.T) { } } -func TestMappingBuilder_loadMapping(t *testing.T) { +func TestMappingBuilderLoadMapping(t *testing.T) { tests := []struct { name string }{ + {name: "jaeger-span-6.json"}, {name: "jaeger-span-7.json"}, {name: "jaeger-span-8.json"}, + {name: "jaeger-service-6.json"}, {name: "jaeger-service-7.json"}, {name: "jaeger-service-8.json"}, + {name: "jaeger-dependencies-6.json"}, {name: "jaeger-dependencies-7.json"}, {name: "jaeger-dependencies-8.json"}, } @@ -96,7 +107,7 @@ func TestMappingBuilder_loadMapping(t *testing.T) { } } -func TestMappingBuilder_fixMapping(t *testing.T) { +func TestMappingBuilderFixMapping(t *testing.T) { tests := []struct { name string templateBuilderMockFunc func() *mocks.TemplateBuilder @@ -156,7 +167,7 @@ func TestMappingBuilder_fixMapping(t *testing.T) { } } -func TestMappingBuilder_GetSpanServiceMappings(t *testing.T) { +func TestMappingBuilderGetSpanServiceMappings(t *testing.T) { type args struct { shards int64 replicas int64 @@ -210,6 +221,65 @@ func TestMappingBuilder_GetSpanServiceMappings(t *testing.T) { }, err: "template load error", }, + + { + name: "ES Version < 7", + args: args{ + shards: 3, + replicas: 3, + esVersion: 6, + indexPrefix: "test", + useILM: true, + ilmPolicyName: "jaeger-test-policy", + }, + mockNewTextTemplateBuilder: func() es.TemplateBuilder { + tb := mocks.TemplateBuilder{} + ta := mocks.TemplateApplier{} + ta.On("Execute", mock.Anything, mock.Anything).Return(nil) + tb.On("Parse", mock.Anything).Return(&ta, nil) + return &tb + }, + err: "", + }, + { + name: "ES Version < 7 Service Error", + args: args{ + shards: 3, + replicas: 3, + esVersion: 6, + indexPrefix: "test", + useILM: true, + ilmPolicyName: "jaeger-test-policy", + }, + mockNewTextTemplateBuilder: func() es.TemplateBuilder { + tb := mocks.TemplateBuilder{} + ta := mocks.TemplateApplier{} + ta.On("Execute", mock.Anything, mock.Anything).Return(nil).Once() + ta.On("Execute", mock.Anything, mock.Anything).Return(errors.New("template load error")).Once() + tb.On("Parse", mock.Anything).Return(&ta, nil) + return &tb + }, + err: "template load error", + }, + { + name: "ES Version < 7 Span Error", + args: args{ + shards: 3, + replicas: 3, + esVersion: 6, + indexPrefix: "test", + useILM: true, + ilmPolicyName: "jaeger-test-policy", + }, + mockNewTextTemplateBuilder: func() es.TemplateBuilder { + tb := mocks.TemplateBuilder{} + ta := mocks.TemplateApplier{} + ta.On("Execute", mock.Anything, mock.Anything).Return(errors.New("template load error")) + tb.On("Parse", mock.Anything).Return(&ta, nil) + return &tb + }, + err: "template load error", + }, { name: "ES Version 7 Span Error", args: args{ @@ -251,7 +321,7 @@ func TestMappingBuilder_GetSpanServiceMappings(t *testing.T) { } } -func TestMappingBuilder_GetDependenciesMappings(t *testing.T) { +func TestMappingBuilderGetDependenciesMappings(t *testing.T) { tb := mocks.TemplateBuilder{} ta := mocks.TemplateApplier{} ta.On("Execute", mock.Anything, mock.Anything).Return(errors.New("template load error")) @@ -264,7 +334,7 @@ func TestMappingBuilder_GetDependenciesMappings(t *testing.T) { require.EqualError(t, err, "template load error") } -func TestMappingBuilder_GetSamplingMappings(t *testing.T) { +func TestMappingBuilderGetSamplingMappings(t *testing.T) { tb := mocks.TemplateBuilder{} ta := mocks.TemplateApplier{} ta.On("Execute", mock.Anything, mock.Anything).Return(errors.New("template load error")) diff --git a/plugin/storage/integration/elasticsearch_test.go b/plugin/storage/integration/elasticsearch_test.go index 3f36334f7f9..eebed03dbc6 100644 --- a/plugin/storage/integration/elasticsearch_test.go +++ b/plugin/storage/integration/elasticsearch_test.go @@ -201,7 +201,7 @@ func TestElasticsearchStorage_IndexTemplates(t *testing.T) { esVersion, err := s.getVersion() require.NoError(t, err) // TODO abstract this into pkg/es/client.IndexManagementLifecycleAPI - if esVersion == 7 { + if esVersion == 6 || esVersion == 7 { serviceTemplateExists, err := s.client.IndexTemplateExists(indexPrefix + "-jaeger-service").Do(context.Background()) require.NoError(t, err) assert.True(t, serviceTemplateExists) diff --git a/plugin/storage/integration/es_index_cleaner_test.go b/plugin/storage/integration/es_index_cleaner_test.go index d9bc35bd67d..6a945dfe363 100644 --- a/plugin/storage/integration/es_index_cleaner_test.go +++ b/plugin/storage/integration/es_index_cleaner_test.go @@ -33,7 +33,7 @@ const ( spanIndexName = "jaeger-span-2019-01-01" serviceIndexName = "jaeger-service-2019-01-01" indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:latest" - rolloverImage = "jaegertracing/jaeger-es-rollover:latest" + rolloverImage = "jaegertracing/jaeger-es-rollover:1.57.0" rolloverNowEnvVar = `CONDITIONS='{"max_age":"0s"}'` ) From a23393232b28b2d48650b7332c2e338a8e88dd4f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 4 Jul 2024 21:50:29 +0200 Subject: [PATCH 18/52] Update module golang.org/x/sys to v0.22.0 (#5708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/sys | `v0.21.0` -> `v0.22.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.21.0/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.21.0/v0.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 37d2ca5d3be..09d00c430e8 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 golang.org/x/net v0.26.0 - golang.org/x/sys v0.21.0 + golang.org/x/sys v0.22.0 google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 23e6f706ee7..ab30534b426 100644 --- a/go.sum +++ b/go.sum @@ -616,8 +616,8 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 7ef475d7cde87be5f7724154d7a484a63dbefac6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 4 Jul 2024 22:05:41 +0200 Subject: [PATCH 19/52] Prevent major version upgrades in docker-compose/elasticsearch/v6/docker-compose.yml (#5710) renovate bot tried to bump it to v7 --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- renovate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/renovate.json b/renovate.json index b4913b64c9c..5a2fc537ab4 100644 --- a/renovate.json +++ b/renovate.json @@ -17,6 +17,7 @@ "matchFileNames": [ "docker-compose/cassandra/v3/docker-compose.yaml", "docker-compose/cassandra/v4/docker-compose.yaml", + "docker-compose/elasticsearch/v6/docker-compose.yml", "docker-compose/elasticsearch/v7/docker-compose.yml", "docker-compose/elasticsearch/v8/docker-compose.yml", "docker-compose/kafka-integration-test/docker-compose.yml", From 7b7e5ccb8ecb3a66ea3a6b06ecca63bff97897e9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 5 Jul 2024 19:16:27 +0200 Subject: [PATCH 20/52] Update module golang.org/x/net to v0.27.0 (#5711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | golang.org/x/net | `v0.26.0` -> `v0.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.26.0/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.26.0/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 09d00c430e8..b45d71f79e3 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( go.uber.org/automaxprocs v1.5.3 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - golang.org/x/net v0.26.0 + golang.org/x/net v0.27.0 golang.org/x/sys v0.22.0 google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 @@ -210,7 +210,7 @@ require ( go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/text v0.16.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect diff --git a/go.sum b/go.sum index ab30534b426..aaeb0c4b542 100644 --- a/go.sum +++ b/go.sum @@ -539,8 +539,8 @@ golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -579,8 +579,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= From 13c715b3bd6ec71717f11af2562af6413f9b064e Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 7 Jul 2024 19:06:41 -0700 Subject: [PATCH 21/52] [bug] Use correct argument as jaeger-version (#5716) --- .github/workflows/ci-elasticsearch.yml | 3 -- ...-scripts.yml => ci-lint-shell-scripts.yml} | 12 ++---- .github/workflows/ci-opensearch.yml | 3 -- .../internal/integration/e2e_integration.go | 40 ++++++++++--------- .../integration/e2e_integration_test.go | 13 ++++++ scripts/es-integration-test.sh | 18 ++++++--- 6 files changed, 50 insertions(+), 39 deletions(-) rename .github/workflows/{ci-validation-of-shell-scripts.yml => ci-lint-shell-scripts.yml} (84%) create mode 100644 cmd/jaeger/internal/integration/e2e_integration_test.go diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 44a5e0a8532..21c381bad06 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -53,9 +53,6 @@ jobs: with: go-version: 1.22.x - - name: Install tools - run: make install-ci - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Run ${{ matrix.version.distribution }} integration tests id: test-execution diff --git a/.github/workflows/ci-validation-of-shell-scripts.yml b/.github/workflows/ci-lint-shell-scripts.yml similarity index 84% rename from .github/workflows/ci-validation-of-shell-scripts.yml rename to .github/workflows/ci-lint-shell-scripts.yml index 8cc195e3102..dfa8af30633 100644 --- a/.github/workflows/ci-validation-of-shell-scripts.yml +++ b/.github/workflows/ci-lint-shell-scripts.yml @@ -1,4 +1,4 @@ -name: Validation Of Shell Scripts +name: Lint Shell Scripts on: push: @@ -11,7 +11,7 @@ permissions: contents: read jobs: - validation-of-shell-scripts: + link-shell-scripts: runs-on: ubuntu-latest steps: @@ -20,7 +20,7 @@ jobs: with: egress-policy: audit - - name: check out code + - name: check out code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Install shellcheck @@ -28,9 +28,3 @@ jobs: - name: Run shellcheck run: shellcheck scripts/*.sh - - - - - - diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-opensearch.yml index 5e8a2b34974..037003e2145 100644 --- a/.github/workflows/ci-opensearch.yml +++ b/.github/workflows/ci-opensearch.yml @@ -50,9 +50,6 @@ jobs: with: go-version: 1.22.x - - name: Install tools - run: make install-ci - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - name: Run ${{ matrix.version.distribution }} integration tests diff --git a/cmd/jaeger/internal/integration/e2e_integration.go b/cmd/jaeger/internal/integration/e2e_integration.go index 9b803050904..6ddcb538cff 100644 --- a/cmd/jaeger/internal/integration/e2e_integration.go +++ b/cmd/jaeger/internal/integration/e2e_integration.go @@ -131,35 +131,37 @@ func createStorageCleanerConfig(t *testing.T, configFile string, storage string) err = yaml.Unmarshal(data, &config) require.NoError(t, err) - service, ok := config["service"].(map[string]any) + serviceAny, ok := config["service"] require.True(t, ok) + service := serviceAny.(map[string]any) service["extensions"] = append(service["extensions"].([]any), "storage_cleaner") - extensions, ok := config["extensions"].(map[string]any) + extensionsAny, ok := config["extensions"] require.True(t, ok) - query, ok := extensions["jaeger_query"].(map[string]any) + extensions := extensionsAny.(map[string]any) + queryAny, ok := extensions["jaeger_query"] require.True(t, ok) - trace_storage := query["trace_storage"].(string) - extensions["storage_cleaner"] = map[string]string{"trace_storage": trace_storage} + traceStorageAny, ok := queryAny.(map[string]any)["trace_storage"] + require.True(t, ok) + traceStorage := traceStorageAny.(string) + extensions["storage_cleaner"] = map[string]string{"trace_storage": traceStorage} - jaegerStorage, ok := extensions["jaeger_storage"].(map[string]any) + jaegerStorageAny, ok := extensions["jaeger_storage"] + require.True(t, ok) + jaegerStorage := jaegerStorageAny.(map[string]any) + backendsAny, ok := jaegerStorage["backends"] require.True(t, ok) + backends := backendsAny.(map[string]any) switch storage { - case "elasticsearch": - elasticsearch, ok := jaegerStorage["elasticsearch"].(map[string]any) - require.True(t, ok) - esMain, ok := elasticsearch["es_main"].(map[string]any) - require.True(t, ok) + case "elasticsearch", "opensearch": + someStoreAny, ok := backends["some_storage"] + require.True(t, ok, "expecting 'some_storage' entry, found: %v", jaegerStorage) + someStore := someStoreAny.(map[string]any) + esMainAny, ok := someStore[storage] + require.True(t, ok, "expecting '%s' entry, found %v", storage, someStore) + esMain := esMainAny.(map[string]any) esMain["service_cache_ttl"] = "1ms" - - case "opensearch": - opensearch, ok := jaegerStorage["opensearch"].(map[string]any) - require.True(t, ok) - osMain, ok := opensearch["os_main"].(map[string]any) - require.True(t, ok) - osMain["service_cache_ttl"] = "1ms" - default: // Do Nothing } diff --git a/cmd/jaeger/internal/integration/e2e_integration_test.go b/cmd/jaeger/internal/integration/e2e_integration_test.go new file mode 100644 index 00000000000..a6aaca13623 --- /dev/null +++ b/cmd/jaeger/internal/integration/e2e_integration_test.go @@ -0,0 +1,13 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import "testing" + +func TestCreateStorageCleanerConfig(t *testing.T) { + // Ensure that we can parse the existing configs correctly. + // This is faster to run than the full integration test. + createStorageCleanerConfig(t, "../../config-elasticsearch.yaml", "elasticsearch") + createStorageCleanerConfig(t, "../../config-opensearch.yaml", "opensearch") +} diff --git a/scripts/es-integration-test.sh b/scripts/es-integration-test.sh index 9b1ecf6e794..0428eac9e41 100755 --- a/scripts/es-integration-test.sh +++ b/scripts/es-integration-test.sh @@ -1,19 +1,22 @@ #!/bin/bash PS4='T$(date "+%H:%M:%S") ' -set -euxf -o pipefail +set -euf -o pipefail # use global variables to reflect status of db db_is_up= usage() { - echo $"Usage: $0 " + echo "Usage: $0 " + echo " backend: elasticsearch | opensearch" + echo " backend_version: major version, e.g. 7.x" + echo " jaeger_version: major version, e.g. v1 | v2" exit 1 } check_arg() { if [ ! $# -eq 3 ]; then - echo "ERROR: need exactly three arguments, " + echo "ERROR: need exactly three arguments" usage fi } @@ -100,16 +103,21 @@ main() { check_arg "$@" local distro=$1 local es_version=$2 - local j_version=$2 + local j_version=$3 + + set -x bring_up_storage "${distro}" "${es_version}" if [[ "${j_version}" == "v2" ]]; then STORAGE=${distro} SPAN_STORAGE_TYPE=${distro} make jaeger-v2-storage-integration-test - else + elif [[ "${j_version}" == "v1" ]]; then STORAGE=${distro} make storage-integration-test make index-cleaner-integration-test make index-rollover-integration-test + else + echo "ERROR: Invalid argument value jaeger_version=${j_version}, expecing v1/v2". + exit 1 fi } From 31e8ef9ec840b16068dda367a767336c3b7fc13a Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Mon, 8 Jul 2024 07:36:52 -0700 Subject: [PATCH 22/52] [tracegen] Allow use of adaptive sampling (#5718) ## Which problem is this PR solving? - Part of #5717 ## Description of the changes - Add a new flag to tracegen to allow it to use `jaegerremotesampling` contrib module with OTEL SDK ## How was this change tested? - It's not actually working at the moment, the backend does not recognize the spans without sampling tags Signed-off-by: Yuri Shkuro --- cmd/tracegen/main.go | 27 +++++++++++++++++-- go.mod | 1 + go.sum | 2 ++ scripts/adaptive-sampling-integration-test.sh | 17 ++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 scripts/adaptive-sampling-integration-test.sh diff --git a/cmd/tracegen/main.go b/cmd/tracegen/main.go index 30b70411078..9970c619128 100644 --- a/cmd/tracegen/main.go +++ b/cmd/tracegen/main.go @@ -19,8 +19,10 @@ import ( "errors" "flag" "fmt" + "time" "github.com/go-logr/zapr" + "go.opentelemetry.io/contrib/samplers/jaegerremote" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" @@ -39,6 +41,8 @@ import ( "github.com/jaegertracing/jaeger/pkg/version" ) +var flagAdaptiveSamplingEndpoint string + func main() { zc := zap.NewDevelopmentConfig() zc.Level = zap.NewAtomicLevelAt(zapcore.Level(-8)) // level used by OTEL's Debug() @@ -51,6 +55,14 @@ func main() { fs := flag.CommandLine cfg := new(tracegen.Config) cfg.Flags(fs) + fs.StringVar( + &flagAdaptiveSamplingEndpoint, + "adaptive-sampling", + "", + "HTTP endpoint to use to retrieve sampling strategies, "+ + "e.g. http://localhost:14268/api/sampling. "+ + "When not specified a standard SDK sampler will be used "+ + "(see OTEL_TRACES_SAMPLER env var in OTEL docs)") flag.Parse() logger.Info(version.Get().String()) @@ -94,10 +106,21 @@ func createTracers(cfg *tracegen.Config, logger *zap.Logger) ([]trace.Tracer, fu logger.Sugar().Fatalf("resource creation failed: %s", err) } - tp := sdktrace.NewTracerProvider( + opts := []sdktrace.TracerProviderOption{ sdktrace.WithBatcher(exp, sdktrace.WithBlocking()), sdktrace.WithResource(res), - ) + } + if flagAdaptiveSamplingEndpoint != "" { + jaegerRemoteSampler := jaegerremote.New( + svc, + jaegerremote.WithSamplingServerURL(flagAdaptiveSamplingEndpoint), + jaegerremote.WithSamplingRefreshInterval(5*time.Second), + jaegerremote.WithInitialSampler(sdktrace.TraceIDRatioBased(0.5)), + ) + opts = append(opts, sdktrace.WithSampler(jaegerRemoteSampler)) + logger.Sugar().Infof("using adaptive sampling URL: %s", flagAdaptiveSamplingEndpoint) + } + tp := sdktrace.NewTracerProvider(opts...) tracers = append(tracers, tp.Tracer(cfg.Service)) shutdown = append(shutdown, tp.Shutdown) } diff --git a/go.mod b/go.mod index b45d71f79e3..59136d270ac 100644 --- a/go.mod +++ b/go.mod @@ -71,6 +71,7 @@ require ( go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 + go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 diff --git a/go.sum b/go.sum index aaeb0c4b542..1fef2584e96 100644 --- a/go.sum +++ b/go.sum @@ -489,6 +489,8 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIX go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0 h1:OYxqumWcd1yaV/qvCt1B7Sru9OeUNGjeXq/oldx3AGk= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0/go.mod h1:2tZTRqCbvx7nG57wUwd5NQpNVujOWnR84iPLllIH0Ok= go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= diff --git a/scripts/adaptive-sampling-integration-test.sh b/scripts/adaptive-sampling-integration-test.sh new file mode 100644 index 00000000000..99be9e59fd1 --- /dev/null +++ b/scripts/adaptive-sampling-integration-test.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -euf -o pipefail + +# This script is currently a placeholder. + +# Commands to run integration test: +# SAMPLING_STORAGE_TYPE=memory SAMPLING_CONFIG_TYPE=adaptive go run -tags=ui ./cmd/all-in-one --log-level=debug +# go run ./cmd/tracegen -adaptive-sampling=http://localhost:14268/api/sampling -pause=10ms -duration=60m + +# Check how strategy is changing +# curl 'http://localhost:14268/api/sampling?service=tracegen' | jq . + +# Issues +# - SDK does not report sampling probability in the tags the way Jaeger SDKs did +# - Server probably does not recognize spans as having adaptive sampling without sampler info +# - There is no way to modify target traces-per-second dynamically, must restart collector. From ea2ec181b43a5fe1d62a82644cca0320a055b9a7 Mon Sep 17 00:00:00 2001 From: mehul gautam Date: Mon, 8 Jul 2024 21:57:06 +0530 Subject: [PATCH 23/52] Run jaeger-es-index-cleaner and jaeger-es-rollover locally (#5714) ## Which problem is this PR solving? - https://github.com/jaegertracing/jaeger/issues/5709 ## Description of the changes - added a function build_local_img ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: mehul gautam Signed-off-by: mehul gautam Co-authored-by: mehul gautam --- pkg/version/build_test.go | 2 +- plugin/storage/integration/es_index_cleaner_test.go | 4 ++-- scripts/es-integration-test.sh | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkg/version/build_test.go b/pkg/version/build_test.go index d08224e188f..94b9360f50c 100644 --- a/pkg/version/build_test.go +++ b/pkg/version/build_test.go @@ -43,4 +43,4 @@ func TestString(t *testing.T) { } expectedOutput := "git-commit=foobar, git-version=v1.2.3, build-date=2024-01-04" assert.Equal(t, expectedOutput, test.String()) -} +} \ No newline at end of file diff --git a/plugin/storage/integration/es_index_cleaner_test.go b/plugin/storage/integration/es_index_cleaner_test.go index 6a945dfe363..30ad3ff6bee 100644 --- a/plugin/storage/integration/es_index_cleaner_test.go +++ b/plugin/storage/integration/es_index_cleaner_test.go @@ -32,8 +32,8 @@ const ( samplingIndexName = "jaeger-sampling-2019-01-01" spanIndexName = "jaeger-span-2019-01-01" serviceIndexName = "jaeger-service-2019-01-01" - indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:latest" - rolloverImage = "jaegertracing/jaeger-es-rollover:1.57.0" + indexCleanerImage = "localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test" + rolloverImage = "localhost:5000/jaegertracing/jaeger-es-rollover:local-test" rolloverNowEnvVar = `CONDITIONS='{"max_age":"0s"}'` ) diff --git a/scripts/es-integration-test.sh b/scripts/es-integration-test.sh index 0428eac9e41..a9d98d9798e 100755 --- a/scripts/es-integration-test.sh +++ b/scripts/es-integration-test.sh @@ -99,6 +99,15 @@ teardown_storage() { docker compose -f "${compose_file}" down } +build_local_img(){ + make build-es-index-cleaner GOOS=linux + make build-es-rollover GOOS=linux + make create-baseimg PLATFORMS="linux/$(go env GOARCH)" + #build es-index-cleaner and es-rollover images + GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -t release -p "linux/$(go env GOARCH)" + GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-rollover -d cmd/es-rollover -t release -p "linux/$(go env GOARCH)" +} + main() { check_arg "$@" local distro=$1 @@ -108,7 +117,7 @@ main() { set -x bring_up_storage "${distro}" "${es_version}" - + build_local_img if [[ "${j_version}" == "v2" ]]; then STORAGE=${distro} SPAN_STORAGE_TYPE=${distro} make jaeger-v2-storage-integration-test elif [[ "${j_version}" == "v1" ]]; then From 295293c53c68df4dbc896082a00a5bc3d532cfc9 Mon Sep 17 00:00:00 2001 From: Raghuram Kannan <78465537+FlamingSaint@users.noreply.github.com> Date: Mon, 8 Jul 2024 23:30:50 +0530 Subject: [PATCH 24/52] Cleanup the Prometheus config (#5720) ## Which problem is this PR solving? - Part of #5632 ## Description of the changes - Cleaned up the Prometheus config - Removed namespaceConfig as its not needed for a metrics storage ## How was this change tested? - `make test` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: FlamingSaint --- pkg/version/build_test.go | 2 +- plugin/metrics/prometheus/factory.go | 4 +- plugin/metrics/prometheus/factory_test.go | 27 +++++----- plugin/metrics/prometheus/options.go | 62 ++++++++++------------- 4 files changed, 43 insertions(+), 52 deletions(-) diff --git a/pkg/version/build_test.go b/pkg/version/build_test.go index 94b9360f50c..d08224e188f 100644 --- a/pkg/version/build_test.go +++ b/pkg/version/build_test.go @@ -43,4 +43,4 @@ func TestString(t *testing.T) { } expectedOutput := "git-commit=foobar, git-version=v1.2.3, build-date=2024-01-04" assert.Equal(t, expectedOutput, test.String()) -} \ No newline at end of file +} diff --git a/plugin/metrics/prometheus/factory.go b/plugin/metrics/prometheus/factory.go index 60452061d67..a806942eb46 100644 --- a/plugin/metrics/prometheus/factory.go +++ b/plugin/metrics/prometheus/factory.go @@ -40,7 +40,7 @@ type Factory struct { func NewFactory() *Factory { return &Factory{ tracer: otel.GetTracerProvider(), - options: NewOptions("prometheus"), + options: NewOptions(), } } @@ -64,5 +64,5 @@ func (f *Factory) Initialize(logger *zap.Logger) error { // CreateMetricsReader implements storage.MetricsFactory. func (f *Factory) CreateMetricsReader() (metricsstore.Reader, error) { - return prometheusstore.NewMetricsReader(f.options.Primary.Configuration, f.logger, f.tracer) + return prometheusstore.NewMetricsReader(f.options.Configuration, f.logger, f.tracer) } diff --git a/plugin/metrics/prometheus/factory_test.go b/plugin/metrics/prometheus/factory_test.go index dc03edc2304..bd49eca32d5 100644 --- a/plugin/metrics/prometheus/factory_test.go +++ b/plugin/metrics/prometheus/factory_test.go @@ -34,14 +34,13 @@ func TestPrometheusFactory(t *testing.T) { f := NewFactory() require.NoError(t, f.Initialize(zap.NewNop())) assert.NotNil(t, f.logger) - assert.Equal(t, "prometheus", f.options.Primary.namespace) listener, err := net.Listen("tcp", "localhost:") require.NoError(t, err) assert.NotNil(t, listener) defer listener.Close() - f.options.Primary.ServerURL = "http://" + listener.Addr().String() + f.options.ServerURL = "http://" + listener.Addr().String() reader, err := f.CreateMetricsReader() require.NoError(t, err) @@ -50,11 +49,11 @@ func TestPrometheusFactory(t *testing.T) { func TestWithDefaultConfiguration(t *testing.T) { f := NewFactory() - assert.Equal(t, "http://localhost:9090", f.options.Primary.ServerURL) - assert.Equal(t, 30*time.Second, f.options.Primary.ConnectTimeout) + assert.Equal(t, "http://localhost:9090", f.options.ServerURL) + assert.Equal(t, 30*time.Second, f.options.ConnectTimeout) - assert.Empty(t, f.options.Primary.MetricNamespace) - assert.Equal(t, "ms", f.options.Primary.LatencyUnit) + assert.Empty(t, f.options.MetricNamespace) + assert.Equal(t, "ms", f.options.LatencyUnit) } func TestWithConfiguration(t *testing.T) { @@ -69,10 +68,10 @@ func TestWithConfiguration(t *testing.T) { }) require.NoError(t, err) f.InitFromViper(v, zap.NewNop()) - assert.Equal(t, "http://localhost:1234", f.options.Primary.ServerURL) - assert.Equal(t, 5*time.Second, f.options.Primary.ConnectTimeout) - assert.Equal(t, "test/test_file.txt", f.options.Primary.TokenFilePath) - assert.False(t, f.options.Primary.TokenOverrideFromContext) + assert.Equal(t, "http://localhost:1234", f.options.ServerURL) + assert.Equal(t, 5*time.Second, f.options.ConnectTimeout) + assert.Equal(t, "test/test_file.txt", f.options.TokenFilePath) + assert.False(t, f.options.TokenOverrideFromContext) }) t.Run("with space in token file path", func(t *testing.T) { f := NewFactory() @@ -82,7 +81,7 @@ func TestWithConfiguration(t *testing.T) { }) require.NoError(t, err) f.InitFromViper(v, zap.NewNop()) - assert.Equal(t, "test/ test file.txt", f.options.Primary.TokenFilePath) + assert.Equal(t, "test/ test file.txt", f.options.TokenFilePath) }) t.Run("with custom configuration of prometheus.query", func(t *testing.T) { f := NewFactory() @@ -93,8 +92,8 @@ func TestWithConfiguration(t *testing.T) { }) require.NoError(t, err) f.InitFromViper(v, zap.NewNop()) - assert.Equal(t, "mynamespace", f.options.Primary.MetricNamespace) - assert.Equal(t, "ms", f.options.Primary.LatencyUnit) + assert.Equal(t, "mynamespace", f.options.MetricNamespace) + assert.Equal(t, "ms", f.options.LatencyUnit) }) t.Run("with invalid prometheus.query.duration-unit", func(t *testing.T) { defer func() { @@ -110,7 +109,7 @@ func TestWithConfiguration(t *testing.T) { }) require.NoError(t, err) f.InitFromViper(v, zap.NewNop()) - require.Empty(t, f.options.Primary.LatencyUnit) + require.Empty(t, f.options.LatencyUnit) }) } diff --git a/plugin/metrics/prometheus/options.go b/plugin/metrics/prometheus/options.go index a9f8f98956b..80cf09e3070 100644 --- a/plugin/metrics/prometheus/options.go +++ b/plugin/metrics/prometheus/options.go @@ -27,6 +27,8 @@ import ( ) const ( + prefix = "prometheus" + suffixServerURL = ".server-url" suffixConnectTimeout = ".connect-timeout" suffixTokenFilePath = ".token-file" @@ -48,18 +50,13 @@ const ( defaultNormalizeDuration = false ) -type namespaceConfig struct { - config.Configuration `mapstructure:",squash"` - namespace string -} - // Options stores the configuration entries for this storage. type Options struct { - Primary namespaceConfig `mapstructure:",squash"` + config.Configuration `mapstructure:",squash"` } // NewOptions creates a new Options struct. -func NewOptions(primaryNamespace string) *Options { +func NewOptions() *Options { defaultConfig := config.Configuration{ ServerURL: defaultServerURL, ConnectTimeout: defaultConnectTimeout, @@ -71,75 +68,70 @@ func NewOptions(primaryNamespace string) *Options { } return &Options{ - Primary: namespaceConfig{ - Configuration: defaultConfig, - namespace: primaryNamespace, - }, + Configuration: defaultConfig, } } // AddFlags from this storage to the CLI. func (opt *Options) AddFlags(flagSet *flag.FlagSet) { - nsConfig := &opt.Primary - flagSet.String(nsConfig.namespace+suffixServerURL, defaultServerURL, + flagSet.String(prefix+suffixServerURL, defaultServerURL, "The Prometheus server's URL, must include the protocol scheme e.g. http://localhost:9090") - flagSet.Duration(nsConfig.namespace+suffixConnectTimeout, defaultConnectTimeout, + flagSet.Duration(prefix+suffixConnectTimeout, defaultConnectTimeout, "The period to wait for a connection to Prometheus when executing queries.") - flagSet.String(nsConfig.namespace+suffixTokenFilePath, defaultTokenFilePath, + flagSet.String(prefix+suffixTokenFilePath, defaultTokenFilePath, "The path to a file containing the bearer token which will be included when executing queries against the Prometheus API.") - flagSet.Bool(nsConfig.namespace+suffixOverrideFromContext, true, + flagSet.Bool(prefix+suffixOverrideFromContext, true, "Whether the bearer token should be overridden from context (incoming request)") - flagSet.String(nsConfig.namespace+suffixMetricNamespace, defaultMetricNamespace, + flagSet.String(prefix+suffixMetricNamespace, defaultMetricNamespace, `The metric namespace that is prefixed to the metric name. A '.' separator will be added between `+ `the namespace and the metric name.`) - flagSet.String(nsConfig.namespace+suffixLatencyUnit, defaultLatencyUnit, + flagSet.String(prefix+suffixLatencyUnit, defaultLatencyUnit, `The units used for the "latency" histogram. It can be either "ms" or "s" and should be consistent with the `+ `histogram unit value set in the spanmetrics connector (see: `+ `https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/spanmetricsconnector#configurations). `+ `This also helps jaeger-query determine the metric name when querying for "latency" metrics.`) - flagSet.Bool(nsConfig.namespace+suffixNormalizeCalls, defaultNormalizeCalls, + flagSet.Bool(prefix+suffixNormalizeCalls, defaultNormalizeCalls, `Whether to normalize the "calls" metric name according to `+ `https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheus/README.md. `+ `For example: `+ `"calls" (not normalized) -> "calls_total" (normalized), `) - flagSet.Bool(nsConfig.namespace+suffixNormalizeDuration, defaultNormalizeDuration, + flagSet.Bool(prefix+suffixNormalizeDuration, defaultNormalizeDuration, `Whether to normalize the "duration" metric name according to `+ `https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheus/README.md. `+ `For example: `+ `"duration_bucket" (not normalized) -> "duration_milliseconds_bucket (normalized)"`) - nsConfig.getTLSFlagsConfig().AddFlags(flagSet) + opt.getTLSFlagsConfig().AddFlags(flagSet) } // InitFromViper initializes the options struct with values from Viper. func (opt *Options) InitFromViper(v *viper.Viper) error { - cfg := &opt.Primary - cfg.ServerURL = stripWhiteSpace(v.GetString(cfg.namespace + suffixServerURL)) - cfg.ConnectTimeout = v.GetDuration(cfg.namespace + suffixConnectTimeout) - cfg.TokenFilePath = v.GetString(cfg.namespace + suffixTokenFilePath) + opt.ServerURL = stripWhiteSpace(v.GetString(prefix + suffixServerURL)) + opt.ConnectTimeout = v.GetDuration(prefix + suffixConnectTimeout) + opt.TokenFilePath = v.GetString(prefix + suffixTokenFilePath) - cfg.MetricNamespace = v.GetString(cfg.namespace + suffixMetricNamespace) - cfg.LatencyUnit = v.GetString(cfg.namespace + suffixLatencyUnit) - cfg.NormalizeCalls = v.GetBool(cfg.namespace + suffixNormalizeCalls) - cfg.NormalizeDuration = v.GetBool(cfg.namespace + suffixNormalizeDuration) - cfg.TokenOverrideFromContext = v.GetBool(cfg.namespace + suffixOverrideFromContext) + opt.MetricNamespace = v.GetString(prefix + suffixMetricNamespace) + opt.LatencyUnit = v.GetString(prefix + suffixLatencyUnit) + opt.NormalizeCalls = v.GetBool(prefix + suffixNormalizeCalls) + opt.NormalizeDuration = v.GetBool(prefix + suffixNormalizeDuration) + opt.TokenOverrideFromContext = v.GetBool(prefix + suffixOverrideFromContext) isValidUnit := map[string]bool{"ms": true, "s": true} - if _, ok := isValidUnit[cfg.LatencyUnit]; !ok { - return fmt.Errorf(`duration-unit must be one of "ms" or "s", not %q`, cfg.LatencyUnit) + if _, ok := isValidUnit[opt.LatencyUnit]; !ok { + return fmt.Errorf(`duration-unit must be one of "ms" or "s", not %q`, opt.LatencyUnit) } var err error - cfg.TLS, err = cfg.getTLSFlagsConfig().InitFromViper(v) + opt.TLS, err = opt.getTLSFlagsConfig().InitFromViper(v) if err != nil { return fmt.Errorf("failed to process Prometheus TLS options: %w", err) } return nil } -func (config *namespaceConfig) getTLSFlagsConfig() tlscfg.ClientFlagsConfig { +func (*Options) getTLSFlagsConfig() tlscfg.ClientFlagsConfig { return tlscfg.ClientFlagsConfig{ - Prefix: config.namespace, + Prefix: prefix, } } From a5fd22383d56b42b1974336a74756b78122bd826 Mon Sep 17 00:00:00 2001 From: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:53:55 +0530 Subject: [PATCH 25/52] Implement Telemetery struct for V1 Components Initialization (#5695) **Which problem is this PR solving?** This PR addresses a part of the issue [#5633 ](https://github.com/jaegertracing/jaeger/issues/5633) **Description of the changes** This is a Draft PR to achieve Observability Parity between V1 and V2 components by creating an unified telemetery container to pass observability clients to V1 components. **How was this change tested?** The changes were tested by running the following command: ```bash make test ``` **Checklist** - [x] I have read [CONTRIBUTING_GUIDELINES.md](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md) - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - `for jaeger: make lint test` - `for jaeger-ui: yarn lint` and `yarn test` --------- Signed-off-by: Wise-Wizard Signed-off-by: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Co-authored-by: Yuri Shkuro --- cmd/all-in-one/main.go | 18 ++-- .../internal/extension/jaegerquery/server.go | 35 +++--- cmd/query/app/apiv3/http_gateway.go | 6 +- cmd/query/app/apiv3/http_gateway_test.go | 2 +- cmd/query/app/handler_options.go | 4 +- cmd/query/app/http_handler.go | 7 +- cmd/query/app/http_handler_test.go | 2 +- cmd/query/app/server.go | 100 +++++++++--------- cmd/query/app/server_test.go | 74 +++++++------ cmd/query/app/token_propagation_test.go | 10 +- cmd/query/main.go | 8 +- pkg/telemetery/settings.go | 40 +++++++ pkg/telemetery/settings_test.go | 78 ++++++++++++++ 13 files changed, 268 insertions(+), 116 deletions(-) create mode 100644 pkg/telemetery/settings.go create mode 100644 pkg/telemetery/settings_test.go diff --git a/cmd/all-in-one/main.go b/cmd/all-in-one/main.go index 185c74a74ab..a051573e5a6 100644 --- a/cmd/all-in-one/main.go +++ b/cmd/all-in-one/main.go @@ -43,6 +43,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/config" "github.com/jaegertracing/jaeger/pkg/jtracer" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/pkg/version" metricsPlugin "github.com/jaegertracing/jaeger/plugin/metrics" @@ -193,12 +194,17 @@ by default uses only in-memory database.`, logger.Fatal("Could not create collector proxy", zap.Error(err)) } agent := startAgent(cp, aOpts, logger, agentMetricsFactory) - + telset := telemetery.Setting{ + Logger: svc.Logger, + TracerProvider: tracer.OTEL, + Metrics: queryMetricsFactory, + ReportStatus: telemetery.HCAdapter(svc.HC()), + } // query querySrv := startQuery( svc, qOpts, qOpts.BuildQueryServiceOptions(storageFactory, logger), spanReader, dependencyReader, metricsQueryService, - queryMetricsFactory, tm, tracer, + tm, telset, ) svc.RunAndThen(func() { @@ -273,13 +279,13 @@ func startQuery( spanReader spanstore.Reader, depReader dependencystore.Reader, metricsQueryService querysvc.MetricsQueryService, - metricsFactory metrics.Factory, tm *tenancy.Manager, - jt *jtracer.JTracer, + telset telemetery.Setting, ) *queryApp.Server { - spanReader = storageMetrics.NewReadMetricsDecorator(spanReader, metricsFactory) + spanReader = storageMetrics.NewReadMetricsDecorator(spanReader, telset.Metrics) qs := querysvc.NewQueryService(spanReader, depReader, *queryOpts) - server, err := queryApp.NewServer(svc.Logger, svc.HC(), qs, metricsQueryService, qOpts, tm, jt) + + server, err := queryApp.NewServer(qs, metricsQueryService, qOpts, tm, telset) if err != nil { svc.Logger.Fatal("Could not create jaeger-query", zap.Error(err)) } diff --git a/cmd/jaeger/internal/extension/jaegerquery/server.go b/cmd/jaeger/internal/extension/jaegerquery/server.go index dc9fc29323d..a512c8ed07f 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server.go @@ -10,13 +10,12 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" - "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" queryApp "github.com/jaegertracing/jaeger/cmd/query/app" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" - "github.com/jaegertracing/jaeger/pkg/healthcheck" "github.com/jaegertracing/jaeger/pkg/jtracer" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/plugin/metrics/disabled" "github.com/jaegertracing/jaeger/ports" @@ -28,16 +27,16 @@ var ( ) type server struct { - config *Config - logger *zap.Logger - server *queryApp.Server - jtracer *jtracer.JTracer + config *Config + server *queryApp.Server + telset component.TelemetrySettings + closeTracer func(ctx context.Context) error } func newServer(config *Config, otel component.TelemetrySettings) *server { return &server{ config: config, - logger: otel.Logger, + telset: otel, } } @@ -75,22 +74,26 @@ func (s *server) Start(_ context.Context, host component.Host) error { // TODO OTel-collector does not initialize the tracer currently // https://github.com/open-telemetry/opentelemetry-collector/issues/7532 //nolint - s.jtracer, err = jtracer.New("jaeger") + tracerProvider, err := jtracer.New("jaeger") if err != nil { return fmt.Errorf("could not initialize a tracer: %w", err) } + s.closeTracer = tracerProvider.Close + telset := telemetery.Setting{ + Logger: s.telset.Logger, + TracerProvider: tracerProvider.OTEL, + ReportStatus: s.telset.ReportStatus, + } // TODO contextcheck linter complains about next line that context is not passed. It is not wrong. //nolint s.server, err = queryApp.NewServer( - s.logger, // TODO propagate healthcheck updates up to the collector's runtime - healthcheck.New(), qs, metricsQueryService, s.makeQueryOptions(), tm, - s.jtracer, + telset, ) if err != nil { return fmt.Errorf("could not create jaeger-query: %w", err) @@ -105,7 +108,7 @@ func (s *server) Start(_ context.Context, host component.Host) error { func (s *server) addArchiveStorage(opts *querysvc.QueryServiceOptions, host component.Host) error { if s.config.TraceStorageArchive == "" { - s.logger.Info("Archive storage not configured") + s.telset.Logger.Info("Archive storage not configured") return nil } @@ -114,8 +117,8 @@ func (s *server) addArchiveStorage(opts *querysvc.QueryServiceOptions, host comp return fmt.Errorf("cannot find archive storage factory: %w", err) } - if !opts.InitArchiveStorage(f, s.logger) { - s.logger.Info("Archive storage not initialized") + if !opts.InitArchiveStorage(f, s.telset.Logger) { + s.telset.Logger.Info("Archive storage not initialized") } return nil } @@ -135,8 +138,8 @@ func (s *server) Shutdown(ctx context.Context) error { if s.server != nil { errs = append(errs, s.server.Close()) } - if s.jtracer != nil { - errs = append(errs, s.jtracer.Close(ctx)) + if s.closeTracer != nil { + errs = append(errs, s.closeTracer(ctx)) } return errors.Join(errs...) } diff --git a/cmd/query/app/apiv3/http_gateway.go b/cmd/query/app/apiv3/http_gateway.go index 8aca4a511a2..3b0884c7f12 100644 --- a/cmd/query/app/apiv3/http_gateway.go +++ b/cmd/query/app/apiv3/http_gateway.go @@ -17,12 +17,12 @@ import ( "github.com/gorilla/mux" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" + "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/query/app/internal/api_v3" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/pkg/jtracer" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -48,7 +48,7 @@ type HTTPGateway struct { QueryService *querysvc.QueryService TenancyMgr *tenancy.Manager Logger *zap.Logger - Tracer *jtracer.JTracer + Tracer trace.TracerProvider } // RegisterRoutes registers HTTP endpoints for APIv3 into provided mux. @@ -75,7 +75,7 @@ func (h *HTTPGateway) addRoute( traceMiddleware := otelhttp.NewHandler( otelhttp.WithRouteTag(route, handler), route, - otelhttp.WithTracerProvider(h.Tracer.OTEL)) + otelhttp.WithTracerProvider(h.Tracer)) return router.HandleFunc(route, traceMiddleware.ServeHTTP) } diff --git a/cmd/query/app/apiv3/http_gateway_test.go b/cmd/query/app/apiv3/http_gateway_test.go index 6cd62ba492b..d747bb799ff 100644 --- a/cmd/query/app/apiv3/http_gateway_test.go +++ b/cmd/query/app/apiv3/http_gateway_test.go @@ -46,7 +46,7 @@ func setupHTTPGatewayNoServer( QueryService: q, TenancyMgr: tenancy.NewManager(&tenancyOptions), Logger: zap.NewNop(), - Tracer: jtracer.NoOp(), + Tracer: jtracer.NoOp().OTEL, } gw.router = &mux.Router{} diff --git a/cmd/query/app/handler_options.go b/cmd/query/app/handler_options.go index 853a41a2222..354f6a5fc91 100644 --- a/cmd/query/app/handler_options.go +++ b/cmd/query/app/handler_options.go @@ -18,10 +18,10 @@ package app import ( "time" + "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" - "github.com/jaegertracing/jaeger/pkg/jtracer" ) // HandlerOption is a function that sets some option on the APIHandler @@ -62,7 +62,7 @@ func (handlerOptions) QueryLookbackDuration(queryLookbackDuration time.Duration) } // Tracer creates a HandlerOption that passes the tracer to the handler -func (handlerOptions) Tracer(tracer *jtracer.JTracer) HandlerOption { +func (handlerOptions) Tracer(tracer trace.TracerProvider) HandlerOption { return func(apiHandler *APIHandler) { apiHandler.tracer = tracer } diff --git a/cmd/query/app/http_handler.go b/cmd/query/app/http_handler.go index 5f217118610..58ecb875e33 100644 --- a/cmd/query/app/http_handler.go +++ b/cmd/query/app/http_handler.go @@ -30,6 +30,7 @@ import ( "github.com/gorilla/mux" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/trace" "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" @@ -90,7 +91,7 @@ type APIHandler struct { basePath string apiPrefix string logger *zap.Logger - tracer *jtracer.JTracer + tracer trace.TracerProvider } // NewAPIHandler returns an APIHandler @@ -114,7 +115,7 @@ func NewAPIHandler(queryService *querysvc.QueryService, tm *tenancy.Manager, opt aH.logger = zap.NewNop() } if aH.tracer == nil { - aH.tracer = jtracer.NoOp() + aH.tracer = jtracer.NoOp().OTEL } return aH } @@ -151,7 +152,7 @@ func (aH *APIHandler) handleFunc( traceMiddleware := otelhttp.NewHandler( otelhttp.WithRouteTag(route, traceResponseHandler(handler)), route, - otelhttp.WithTracerProvider(aH.tracer.OTEL)) + otelhttp.WithTracerProvider(aH.tracer)) return router.HandleFunc(route, traceMiddleware.ServeHTTP) } diff --git a/cmd/query/app/http_handler_test.go b/cmd/query/app/http_handler_test.go index ec84b37e55a..3034f6595d0 100644 --- a/cmd/query/app/http_handler_test.go +++ b/cmd/query/app/http_handler_test.go @@ -321,7 +321,7 @@ func TestGetTrace(t *testing.T) { jTracer := jtracer.JTracer{OTEL: tracerProvider} defer tracerProvider.Shutdown(context.Background()) - ts := initializeTestServer(HandlerOptions.Tracer(&jTracer)) + ts := initializeTestServer(HandlerOptions.Tracer(jTracer.OTEL)) defer ts.server.Close() ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), model.NewTraceID(0, 0x123456abc)). diff --git a/cmd/query/app/server.go b/cmd/query/app/server.go index c2debad540a..6e5261beadc 100644 --- a/cmd/query/app/server.go +++ b/cmd/query/app/server.go @@ -26,6 +26,7 @@ import ( "github.com/gorilla/handlers" "github.com/soheilhy/cmux" + "go.opentelemetry.io/collector/component" "go.uber.org/zap" "go.uber.org/zap/zapcore" "google.golang.org/grpc" @@ -38,10 +39,9 @@ import ( "github.com/jaegertracing/jaeger/cmd/query/app/internal/api_v3" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" "github.com/jaegertracing/jaeger/pkg/bearertoken" - "github.com/jaegertracing/jaeger/pkg/healthcheck" - "github.com/jaegertracing/jaeger/pkg/jtracer" "github.com/jaegertracing/jaeger/pkg/netutils" "github.com/jaegertracing/jaeger/pkg/recoveryhandler" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/proto-gen/api_v2" "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics" @@ -49,13 +49,9 @@ import ( // Server runs HTTP, Mux and a grpc server type Server struct { - logger *zap.Logger - healthCheck *healthcheck.HealthCheck querySvc *querysvc.QueryService queryOptions *QueryOptions - tracer *jtracer.JTracer // TODO make part of flags.Service - conn net.Listener grpcConn net.Listener httpConn net.Listener @@ -64,10 +60,16 @@ type Server struct { httpServer *httpServer separatePorts bool bgFinished sync.WaitGroup + telemetery.Setting } // NewServer creates and initializes Server -func NewServer(logger *zap.Logger, healthCheck *healthcheck.HealthCheck, querySvc *querysvc.QueryService, metricsQuerySvc querysvc.MetricsQueryService, options *QueryOptions, tm *tenancy.Manager, tracer *jtracer.JTracer) (*Server, error) { +func NewServer(querySvc *querysvc.QueryService, + metricsQuerySvc querysvc.MetricsQueryService, + options *QueryOptions, + tm *tenancy.Manager, + telset telemetery.Setting, +) (*Server, error) { _, httpPort, err := net.SplitHostPort(options.HTTPHostPort) if err != nil { return nil, fmt.Errorf("invalid HTTP server host:port: %w", err) @@ -81,33 +83,31 @@ func NewServer(logger *zap.Logger, healthCheck *healthcheck.HealthCheck, querySv return nil, errors.New("server with TLS enabled can not use same host ports for gRPC and HTTP. Use dedicated HTTP and gRPC host ports instead") } - grpcServer, err := createGRPCServer(querySvc, metricsQuerySvc, options, tm, logger, tracer) + grpcServer, err := createGRPCServer(querySvc, metricsQuerySvc, options, tm, telset) if err != nil { return nil, err } - httpServer, err := createHTTPServer(querySvc, metricsQuerySvc, options, tm, tracer, logger) + httpServer, err := createHTTPServer(querySvc, metricsQuerySvc, options, tm, telset) if err != nil { return nil, err } return &Server{ - logger: logger, - healthCheck: healthCheck, querySvc: querySvc, queryOptions: options, - tracer: tracer, grpcServer: grpcServer, httpServer: httpServer, separatePorts: grpcPort != httpPort, + Setting: telset, }, nil } -func createGRPCServer(querySvc *querysvc.QueryService, metricsQuerySvc querysvc.MetricsQueryService, options *QueryOptions, tm *tenancy.Manager, logger *zap.Logger, tracer *jtracer.JTracer) (*grpc.Server, error) { +func createGRPCServer(querySvc *querysvc.QueryService, metricsQuerySvc querysvc.MetricsQueryService, options *QueryOptions, tm *tenancy.Manager, telset telemetery.Setting) (*grpc.Server, error) { var grpcOpts []grpc.ServerOption if options.TLSGRPC.Enabled { - tlsCfg, err := options.TLSGRPC.Config(logger) + tlsCfg, err := options.TLSGRPC.Config(telset.Logger) if err != nil { return nil, err } @@ -127,8 +127,7 @@ func createGRPCServer(querySvc *querysvc.QueryService, metricsQuerySvc querysvc. reflection.Register(server) handler := NewGRPCHandler(querySvc, metricsQuerySvc, GRPCHandlerOptions{ - Logger: logger, - Tracer: tracer, + Logger: telset.Logger, }) healthServer := health.NewServer() @@ -156,12 +155,11 @@ func createHTTPServer( metricsQuerySvc querysvc.MetricsQueryService, queryOpts *QueryOptions, tm *tenancy.Manager, - tracer *jtracer.JTracer, - logger *zap.Logger, + telset telemetery.Setting, ) (*httpServer, error) { apiHandlerOptions := []HandlerOption{ - HandlerOptions.Logger(logger), - HandlerOptions.Tracer(tracer), + HandlerOptions.Logger(telset.Logger), + HandlerOptions.Tracer(telset.TracerProvider), HandlerOptions.MetricsQueryService(metricsQuerySvc), } @@ -177,20 +175,20 @@ func createHTTPServer( (&apiv3.HTTPGateway{ QueryService: querySvc, TenancyMgr: tm, - Logger: logger, - Tracer: tracer, + Logger: telset.Logger, + Tracer: telset.TracerProvider, }).RegisterRoutes(r) apiHandler.RegisterRoutes(r) var handler http.Handler = r handler = additionalHeadersHandler(handler, queryOpts.AdditionalHeaders) if queryOpts.BearerTokenPropagation { - handler = bearertoken.PropagationHandler(logger, handler) + handler = bearertoken.PropagationHandler(telset.Logger, handler) } handler = handlers.CompressHandler(handler) - recoveryHandler := recoveryhandler.NewRecoveryHandler(logger, true) + recoveryHandler := recoveryhandler.NewRecoveryHandler(telset.Logger, true) - errorLog, _ := zap.NewStdLogAt(logger, zapcore.ErrorLevel) + errorLog, _ := zap.NewStdLogAt(telset.Logger, zapcore.ErrorLevel) server := &httpServer{ Server: &http.Server{ Handler: recoveryHandler(handler), @@ -200,14 +198,14 @@ func createHTTPServer( } if queryOpts.TLSHTTP.Enabled { - tlsCfg, err := queryOpts.TLSHTTP.Config(logger) // This checks if the certificates are correctly provided + tlsCfg, err := queryOpts.TLSHTTP.Config(telset.Logger) // This checks if the certificates are correctly provided if err != nil { return nil, err } server.TLSConfig = tlsCfg } - server.staticHandlerCloser = RegisterStaticHandler(r, logger, queryOpts, querySvc.GetCapabilities()) + server.staticHandlerCloser = RegisterStaticHandler(r, telset.Logger, queryOpts, querySvc.GetCapabilities()) return server, nil } @@ -232,7 +230,7 @@ func (s *Server) initListener() (cmux.CMux, error) { if err != nil { return nil, err } - s.logger.Info( + s.Logger.Info( "Query server started", zap.String("http_addr", s.httpConn.Addr().String()), zap.String("grpc_addr", s.grpcConn.Addr().String()), @@ -253,7 +251,7 @@ func (s *Server) initListener() (cmux.CMux, error) { tcpPort = port } - s.logger.Info( + s.Logger.Info( "Query server started", zap.Int("port", tcpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) @@ -297,7 +295,8 @@ func (s *Server) Start() error { s.bgFinished.Add(1) go func() { - s.logger.Info("Starting HTTP server", zap.Int("port", httpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) + defer s.bgFinished.Done() + s.Logger.Info("Starting HTTP server", zap.Int("port", httpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) var err error if s.queryOptions.TLSHTTP.Enabled { err = s.httpServer.ServeTLS(s.httpConn, "", "") @@ -305,44 +304,45 @@ func (s *Server) Start() error { err = s.httpServer.Serve(s.httpConn) } if err != nil && !errors.Is(err, http.ErrServerClosed) && !errors.Is(err, cmux.ErrListenerClosed) && !errors.Is(err, cmux.ErrServerClosed) { - s.logger.Error("Could not start HTTP server", zap.Error(err)) + s.Logger.Error("Could not start HTTP server", zap.Error(err)) + s.ReportStatus(component.NewFatalErrorEvent(err)) + return } - s.logger.Info("HTTP server stopped", zap.Int("port", httpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) - s.healthCheck.Set(healthcheck.Unavailable) - s.bgFinished.Done() + s.Logger.Info("HTTP server stopped", zap.Int("port", httpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) }() // Start GRPC server concurrently s.bgFinished.Add(1) go func() { - s.logger.Info("Starting GRPC server", zap.Int("port", grpcPort), zap.String("addr", s.queryOptions.GRPCHostPort)) + defer s.bgFinished.Done() + s.Logger.Info("Starting GRPC server", zap.Int("port", grpcPort), zap.String("addr", s.queryOptions.GRPCHostPort)) err := s.grpcServer.Serve(s.grpcConn) if err != nil && !errors.Is(err, cmux.ErrListenerClosed) && !errors.Is(err, cmux.ErrServerClosed) { - s.logger.Error("Could not start GRPC server", zap.Error(err)) + s.Logger.Error("Could not start GRPC server", zap.Error(err)) + s.ReportStatus(component.NewFatalErrorEvent(err)) + return } - s.logger.Info("GRPC server stopped", zap.Int("port", grpcPort), zap.String("addr", s.queryOptions.GRPCHostPort)) - s.healthCheck.Set(healthcheck.Unavailable) - s.bgFinished.Done() + s.Logger.Info("GRPC server stopped", zap.Int("port", grpcPort), zap.String("addr", s.queryOptions.GRPCHostPort)) }() // Start cmux server concurrently. if !s.separatePorts { s.bgFinished.Add(1) go func() { - s.logger.Info("Starting CMUX server", zap.Int("port", tcpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) + defer s.bgFinished.Done() + s.Logger.Info("Starting CMUX server", zap.Int("port", tcpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) err := cmuxServer.Serve() // TODO: find a way to avoid string comparison. Even though cmux has ErrServerClosed, it's not returned here. if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { - s.logger.Error("Could not start multiplexed server", zap.Error(err)) + s.Logger.Error("Could not start multiplexed server", zap.Error(err)) + s.ReportStatus(component.NewFatalErrorEvent(err)) + return } - s.logger.Info("CMUX server stopped", zap.Int("port", tcpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) - s.healthCheck.Set(healthcheck.Unavailable) - s.bgFinished.Done() + s.Logger.Info("CMUX server stopped", zap.Int("port", tcpPort), zap.String("addr", s.queryOptions.HTTPHostPort)) }() } - return nil } @@ -353,20 +353,20 @@ func (s *Server) Close() error { s.queryOptions.TLSHTTP.Close(), } - s.logger.Info("Closing HTTP server") + s.Logger.Info("Closing HTTP server") if err := s.httpServer.Close(); err != nil { errs = append(errs, fmt.Errorf("failed to close HTTP server: %w", err)) } - s.logger.Info("Stopping gRPC server") + s.Logger.Info("Stopping gRPC server") s.grpcServer.Stop() if !s.separatePorts { - s.logger.Info("Closing CMux server") + s.Logger.Info("Closing CMux server") s.cmuxServer.Close() } - s.bgFinished.Wait() - s.logger.Info("Server stopped") + + s.Logger.Info("Server stopped") return errors.Join(errs...) } diff --git a/cmd/query/app/server_test.go b/cmd/query/app/server_test.go index b556aecd87f..e2d5c839365 100644 --- a/cmd/query/app/server_test.go +++ b/cmd/query/app/server_test.go @@ -40,6 +40,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/config/tlscfg" "github.com/jaegertracing/jaeger/pkg/healthcheck" "github.com/jaegertracing/jaeger/pkg/jtracer" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/ports" "github.com/jaegertracing/jaeger/proto-gen/api_v2" @@ -49,6 +50,14 @@ import ( var testCertKeyLocation = "../../../pkg/config/tlscfg/testdata" +func initTelSet(logger *zap.Logger, tracerProvider *jtracer.JTracer, hc *healthcheck.HealthCheck) telemetery.Setting { + return telemetery.Setting{ + Logger: logger, + TracerProvider: tracerProvider.OTEL, + ReportStatus: telemetery.HCAdapter(hc), + } +} + func TestServerError(t *testing.T) { srv := &Server{ queryOptions: &QueryOptions{ @@ -66,10 +75,10 @@ func TestCreateTLSServerSinglePortError(t *testing.T) { KeyPath: testCertKeyLocation + "/example-server-key.pem", ClientCAPath: testCertKeyLocation + "/example-CA-cert.pem", } - - _, err := NewServer(zaptest.NewLogger(t), healthcheck.New(), &querysvc.QueryService{}, nil, + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) + _, err := NewServer(&querysvc.QueryService{}, nil, &QueryOptions{HTTPHostPort: ":8080", GRPCHostPort: ":8080", TLSGRPC: tlsCfg, TLSHTTP: tlsCfg}, - tenancy.NewManager(&tenancy.Options{}), jtracer.NoOp()) + tenancy.NewManager(&tenancy.Options{}), telset) require.Error(t, err) } @@ -80,10 +89,10 @@ func TestCreateTLSGrpcServerError(t *testing.T) { KeyPath: "invalid/path", ClientCAPath: "invalid/path", } - - _, err := NewServer(zaptest.NewLogger(t), healthcheck.New(), &querysvc.QueryService{}, nil, + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) + _, err := NewServer(&querysvc.QueryService{}, nil, &QueryOptions{HTTPHostPort: ":8080", GRPCHostPort: ":8081", TLSGRPC: tlsCfg}, - tenancy.NewManager(&tenancy.Options{}), jtracer.NoOp()) + tenancy.NewManager(&tenancy.Options{}), telset) require.Error(t, err) } @@ -94,10 +103,10 @@ func TestCreateTLSHttpServerError(t *testing.T) { KeyPath: "invalid/path", ClientCAPath: "invalid/path", } - - _, err := NewServer(zaptest.NewLogger(t), healthcheck.New(), &querysvc.QueryService{}, nil, + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) + _, err := NewServer(&querysvc.QueryService{}, nil, &QueryOptions{HTTPHostPort: ":8080", GRPCHostPort: ":8081", TLSHTTP: tlsCfg}, - tenancy.NewManager(&tenancy.Options{}), jtracer.NoOp()) + tenancy.NewManager(&tenancy.Options{}), telset) require.Error(t, err) } @@ -354,11 +363,11 @@ func TestServerHTTPTLS(t *testing.T) { } flagsSvc := flags.NewService(ports.QueryAdminHTTP) flagsSvc.Logger = zaptest.NewLogger(t) - + telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) querySvc := makeQuerySvc() - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc.qs, + server, err := NewServer(querySvc.qs, nil, serverOptions, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp()) + telset) require.NoError(t, err) require.NoError(t, server.Start()) t.Cleanup(func() { @@ -493,9 +502,10 @@ func TestServerGRPCTLS(t *testing.T) { flagsSvc.Logger = zaptest.NewLogger(t) querySvc := makeQuerySvc() - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc.qs, + telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) + server, err := NewServer(querySvc.qs, nil, serverOptions, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp()) + telset) require.NoError(t, err) require.NoError(t, server.Start()) t.Cleanup(func() { @@ -535,7 +545,8 @@ func TestServerGRPCTLS(t *testing.T) { } func TestServerBadHostPort(t *testing.T) { - _, err := NewServer(zaptest.NewLogger(t), healthcheck.New(), &querysvc.QueryService{}, nil, + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) + _, err := NewServer(&querysvc.QueryService{}, nil, &QueryOptions{ HTTPHostPort: "8080", // bad string, not :port GRPCHostPort: "127.0.0.1:8081", @@ -544,10 +555,10 @@ func TestServerBadHostPort(t *testing.T) { }, }, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp()) + telset) require.Error(t, err) - _, err = NewServer(zaptest.NewLogger(t), healthcheck.New(), &querysvc.QueryService{}, nil, + _, err = NewServer(&querysvc.QueryService{}, nil, &QueryOptions{ HTTPHostPort: "127.0.0.1:8081", GRPCHostPort: "9123", // bad string, not :port @@ -556,7 +567,7 @@ func TestServerBadHostPort(t *testing.T) { }, }, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp()) + telset) require.Error(t, err) } @@ -566,7 +577,7 @@ func TestServerInUseHostPort(t *testing.T) { conn, err := net.Listen("tcp", availableHostPort) require.NoError(t, err) defer func() { require.NoError(t, conn.Close()) }() - + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) testCases := []struct { name string httpHostPort string @@ -578,8 +589,6 @@ func TestServerInUseHostPort(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { server, err := NewServer( - zaptest.NewLogger(t), - healthcheck.New(), &querysvc.QueryService{}, nil, &QueryOptions{ @@ -590,7 +599,7 @@ func TestServerInUseHostPort(t *testing.T) { }, }, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp(), + telset, ) require.NoError(t, err) require.Error(t, server.Start()) @@ -604,7 +613,8 @@ func TestServerSinglePort(t *testing.T) { flagsSvc.Logger = zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())) hostPort := ports.GetAddressFromCLIOptions(ports.QueryHTTP, "") querySvc := makeQuerySvc() - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc.qs, nil, + telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) + server, err := NewServer(querySvc.qs, nil, &QueryOptions{ GRPCHostPort: hostPort, HTTPHostPort: hostPort, @@ -613,7 +623,7 @@ func TestServerSinglePort(t *testing.T) { }, }, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp()) + telset) require.NoError(t, err) require.NoError(t, server.Start()) t.Cleanup(func() { @@ -644,9 +654,10 @@ func TestServerGracefulExit(t *testing.T) { hostPort := ports.PortToHostPort(ports.QueryAdminHTTP) querySvc := makeQuerySvc() - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc.qs, nil, + telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) + server, err := NewServer(querySvc.qs, nil, &QueryOptions{GRPCHostPort: hostPort, HTTPHostPort: hostPort}, - tenancy.NewManager(&tenancy.Options{}), jtracer.NoOp()) + tenancy.NewManager(&tenancy.Options{}), telset) require.NoError(t, err) require.NoError(t, server.Start()) @@ -676,11 +687,11 @@ func TestServerHandlesPortZero(t *testing.T) { flagsSvc.Logger = zap.New(zapCore) querySvc := &querysvc.QueryService{} - tracer := jtracer.NoOp() - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc, nil, + telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) + server, err := NewServer(querySvc, nil, &QueryOptions{GRPCHostPort: ":0", HTTPHostPort: ":0"}, tenancy.NewManager(&tenancy.Options{}), - tracer) + telset) require.NoError(t, err) require.NoError(t, server.Start()) defer server.Close() @@ -735,8 +746,9 @@ func TestServerHTTPTenancy(t *testing.T) { tenancyMgr := tenancy.NewManager(&serverOptions.Tenancy) querySvc := makeQuerySvc() querySvc.spanReader.On("FindTraces", mock.Anything, mock.Anything).Return([]*model.Trace{mockTrace}, nil).Once() - server, err := NewServer(zaptest.NewLogger(t), healthcheck.New(), querySvc.qs, - nil, serverOptions, tenancyMgr, jtracer.NoOp()) + telset := initTelSet(zaptest.NewLogger(t), jtracer.NoOp(), healthcheck.New()) + server, err := NewServer(querySvc.qs, + nil, serverOptions, tenancyMgr, telset) require.NoError(t, err) require.NoError(t, server.Start()) t.Cleanup(func() { diff --git a/cmd/query/app/token_propagation_test.go b/cmd/query/app/token_propagation_test.go index 1e9a0ebfea4..a474c1188cc 100644 --- a/cmd/query/app/token_propagation_test.go +++ b/cmd/query/app/token_propagation_test.go @@ -32,6 +32,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/config" "github.com/jaegertracing/jaeger/pkg/jtracer" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/plugin/storage/es" "github.com/jaegertracing/jaeger/ports" @@ -91,7 +92,12 @@ func runQueryService(t *testing.T, esURL string) *Server { require.NoError(t, err) querySvc := querysvc.NewQueryService(spanReader, nil, querysvc.QueryServiceOptions{}) - server, err := NewServer(flagsSvc.Logger, flagsSvc.HC(), querySvc, nil, + telset := telemetery.Setting{ + Logger: flagsSvc.Logger, + TracerProvider: jtracer.NoOp().OTEL, + ReportStatus: telemetery.HCAdapter(flagsSvc.HC()), + } + server, err := NewServer(querySvc, nil, &QueryOptions{ GRPCHostPort: ":0", HTTPHostPort: ":0", @@ -100,7 +106,7 @@ func runQueryService(t *testing.T, esURL string) *Server { }, }, tenancy.NewManager(&tenancy.Options{}), - jtracer.NoOp(), + telset, ) require.NoError(t, err) require.NoError(t, server.Start()) diff --git a/cmd/query/main.go b/cmd/query/main.go index 42f698669f0..36c54c63197 100644 --- a/cmd/query/main.go +++ b/cmd/query/main.go @@ -37,6 +37,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/config" "github.com/jaegertracing/jaeger/pkg/jtracer" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/pkg/version" metricsPlugin "github.com/jaegertracing/jaeger/plugin/metrics" @@ -113,7 +114,12 @@ func main() { dependencyReader, *queryServiceOptions) tm := tenancy.NewManager(&queryOpts.Tenancy) - server, err := app.NewServer(svc.Logger, svc.HC(), queryService, metricsQueryService, queryOpts, tm, jt) + telset := telemetery.Setting{ + Logger: logger, + TracerProvider: jt.OTEL, + ReportStatus: telemetery.HCAdapter(svc.HC()), + } + server, err := app.NewServer(queryService, metricsQueryService, queryOpts, tm, telset) if err != nil { logger.Fatal("Failed to create server", zap.Error(err)) } diff --git a/pkg/telemetery/settings.go b/pkg/telemetery/settings.go new file mode 100644 index 00000000000..1cb9551a6b9 --- /dev/null +++ b/pkg/telemetery/settings.go @@ -0,0 +1,40 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package telemetery + +import ( + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/otel/trace" + "go.uber.org/zap" + + "github.com/jaegertracing/jaeger/pkg/healthcheck" + "github.com/jaegertracing/jaeger/pkg/metrics" +) + +type Setting struct { + Logger *zap.Logger + TracerProvider trace.TracerProvider + Metrics metrics.Factory + ReportStatus func(*component.StatusEvent) +} + +func HCAdapter(hc *healthcheck.HealthCheck) func(*component.StatusEvent) { + return func(event *component.StatusEvent) { + var hcStatus healthcheck.Status + switch event.Status() { + case component.StatusOK: + hcStatus = healthcheck.Ready + case component.StatusStarting, + component.StatusRecoverableError, + component.StatusPermanentError, + component.StatusNone, + component.StatusStopping, + component.StatusStopped: + hcStatus = healthcheck.Unavailable + case component.StatusFatalError: + hcStatus = healthcheck.Broken + } + hc.Set(hcStatus) + } +} diff --git a/pkg/telemetery/settings_test.go b/pkg/telemetery/settings_test.go new file mode 100644 index 00000000000..bb82b61e57d --- /dev/null +++ b/pkg/telemetery/settings_test.go @@ -0,0 +1,78 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package telemetery_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component" + + "github.com/jaegertracing/jaeger/pkg/healthcheck" + "github.com/jaegertracing/jaeger/pkg/telemetery" + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestHCAdapter(t *testing.T) { + tests := []struct { + name string + status component.Status + expectedHC healthcheck.Status + }{ + { + name: "StatusOK", + status: component.StatusOK, + expectedHC: healthcheck.Ready, + }, + { + name: "StatusStarting", + status: component.StatusStarting, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusRecoverableError", + status: component.StatusRecoverableError, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusPermanentError", + status: component.StatusPermanentError, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusNone", + status: component.StatusNone, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusStopping", + status: component.StatusStopping, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusStopped", + status: component.StatusStopped, + expectedHC: healthcheck.Unavailable, + }, + { + name: "StatusFatalError", + status: component.StatusFatalError, + expectedHC: healthcheck.Broken, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + hc := healthcheck.New() + hcAdapter := telemetery.HCAdapter(hc) + event := component.NewStatusEvent(tt.status) + hcAdapter(event) + assert.Equal(t, tt.expectedHC, hc.Get()) + }) + } +} + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} From 7361e15356bd2819d09fa612888ca1a7da6426f7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 10 Jul 2024 04:52:33 +0200 Subject: [PATCH 26/52] Update github-actions deps (#5722) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-node](https://togithub.com/actions/setup-node) | action | patch | `v4.0.2` -> `v4.0.3` | | [actions/upload-artifact](https://togithub.com/actions/upload-artifact) | action | patch | `v4.3.3` -> `v4.3.4` | | [anchore/sbom-action](https://togithub.com/anchore/sbom-action) | action | patch | `v0.16.0` -> `v0.16.1` | --- ### Release Notes
actions/setup-node (actions/setup-node) ### [`v4.0.3`](https://togithub.com/actions/setup-node/compare/v4.0.2...v4.0.3) [Compare Source](https://togithub.com/actions/setup-node/compare/v4.0.2...v4.0.3)
actions/upload-artifact (actions/upload-artifact) ### [`v4.3.4`](https://togithub.com/actions/upload-artifact/releases/tag/v4.3.4) [Compare Source](https://togithub.com/actions/upload-artifact/compare/v4.3.3...v4.3.4) ##### What's Changed - Update [@​actions/artifact](https://togithub.com/actions/artifact) version, bump dependencies by [@​robherley](https://togithub.com/robherley) in [https://github.com/actions/upload-artifact/pull/584](https://togithub.com/actions/upload-artifact/pull/584) **Full Changelog**: https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4
anchore/sbom-action (anchore/sbom-action) ### [`v0.16.1`](https://togithub.com/anchore/sbom-action/releases/tag/v0.16.1) [Compare Source](https://togithub.com/anchore/sbom-action/compare/v0.16.0...v0.16.1) #### Changes in v0.16.1 - fix: workaround windows install issue ([#​477](https://togithub.com/anchore/sbom-action/issues/477)) \[[willmurphyscode](https://togithub.com/willmurphyscode)] - fix: allow users to properly use the file input over the default path value ([#​471](https://togithub.com/anchore/sbom-action/issues/471)) \[[komish](https://togithub.com/komish)] - chore(deps): update Syft to v1.5.0 ([#​470](https://togithub.com/anchore/sbom-action/issues/470)) \[[anchore-actions-token-generator](https://togithub.com/anchore-actions-token-generator)] - docs: notes for matrix and required permissions ([#​469](https://togithub.com/anchore/sbom-action/issues/469)) \[[kzantow](https://togithub.com/kzantow)] - chore(deps): bump actions/checkout from 4.1.5 to 4.1.6 ([#​466](https://togithub.com/anchore/sbom-action/issues/466)) \[[dependabot](https://togithub.com/dependabot)]
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ‘» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- .github/actions/setup-node.js/action.yml | 2 +- .github/workflows/ci-release-testing.yml | 2 +- .github/workflows/ci-release.yml | 2 +- .github/workflows/scorecard.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-node.js/action.yml b/.github/actions/setup-node.js/action.yml index 21344f6c734..389604490ac 100644 --- a/.github/actions/setup-node.js/action.yml +++ b/.github/actions/setup-node.js/action.yml @@ -8,7 +8,7 @@ runs: run: | echo "JAEGER_UI_NODE_JS_VERSION=$(cat jaeger-ui/.nvmrc)" >> ${GITHUB_ENV} - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: ${{ env.JAEGER_UI_NODE_JS_VERSION }} cache: 'yarn' diff --git a/.github/workflows/ci-release-testing.yml b/.github/workflows/ci-release-testing.yml index 985485ca055..06c25c10ad4 100644 --- a/.github/workflows/ci-release-testing.yml +++ b/.github/workflows/ci-release-testing.yml @@ -88,7 +88,7 @@ jobs: QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Generate SBOM - uses: anchore/sbom-action@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0 + uses: anchore/sbom-action@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1 with: output-file: jaeger-SBOM.spdx.json upload-release-assets: false diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 8390a918f52..1c79cfd2228 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -112,7 +112,7 @@ jobs: QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Generate SBOM - uses: anchore/sbom-action@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0 + uses: anchore/sbom-action@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1 with: output-file: jaeger-SBOM.spdx.json upload-release-assets: false diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index d9afd92f2de..611e740f498 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -64,7 +64,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 with: name: SARIF file path: results.sarif From 3b7eef0435fa26fa20b7fd4e0416bb3ec4644ef1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:52:52 -0400 Subject: [PATCH 27/52] Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#5719) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
Release notes

Sourced from actions/upload-artifact's releases.

v4.3.4

What's Changed

Full Changelog: https://github.com/actions/upload-artifact/compare/v4.3.3...v4.3.4

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4.3.3&new-version=4.3.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 653ca2c3a9b02edb316930d742de797c3f69eee8 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jul 2024 07:10:59 -0700 Subject: [PATCH 28/52] Apply 'latest' tag to latest published snapshot images (#5724) --- scripts/compute-tags.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/compute-tags.sh b/scripts/compute-tags.sh index abb11bde10d..2feec3c850c 100644 --- a/scripts/compute-tags.sh +++ b/scripts/compute-tags.sh @@ -22,7 +22,6 @@ fi # for docker.io and quay.io BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${MAJOR_MINOR_PATCH}"} IMAGE_TAGS="--tag docker.io/${BASE_BUILD_IMAGE} --tag docker.io/${BUILD_IMAGE} --tag quay.io/${BASE_BUILD_IMAGE} --tag quay.io/${BUILD_IMAGE}" -SNAPSHOT_TAG="${BASE_BUILD_IMAGE}-snapshot:${GITHUB_SHA}" if [ "${MAJOR_MINOR}x" != "x" ]; then MAJOR_MINOR_IMAGE="${BASE_BUILD_IMAGE}:${MAJOR_MINOR}" @@ -34,6 +33,9 @@ if [ "${MAJOR}x" != "x" ]; then IMAGE_TAGS="${IMAGE_TAGS} --tag docker.io/${MAJOR_IMAGE} --tag quay.io/${MAJOR_IMAGE}" fi -IMAGE_TAGS="${IMAGE_TAGS} --tag docker.io/${SNAPSHOT_TAG} --tag quay.io/${SNAPSHOT_TAG}" +SNAPSHOT_TAG1="${BASE_BUILD_IMAGE}-snapshot:${GITHUB_SHA}" +IMAGE_TAGS="${IMAGE_TAGS} --tag docker.io/${SNAPSHOT_TAG1} --tag quay.io/${SNAPSHOT_TAG1}" +SNAPSHOT_TAG2="${BASE_BUILD_IMAGE}-snapshot:latest" +IMAGE_TAGS="${IMAGE_TAGS} --tag docker.io/${SNAPSHOT_TAG2} --tag quay.io/${SNAPSHOT_TAG2}" echo "${IMAGE_TAGS}" From 8c9f6c6df758d647f1cdb8b123b34a5743eaf87d Mon Sep 17 00:00:00 2001 From: Joe Elliott Date: Wed, 10 Jul 2024 11:12:40 -0400 Subject: [PATCH 29/52] Prepare release v1.59.0 (#5726) Prepares Jaeger for the 1.59.0 release. Updates changelog, jaeger-ui and rotates release managers. --------- Signed-off-by: Joe Elliott Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- CHANGELOG.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ RELEASE.md | 2 +- jaeger-ui | 2 +- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e4949327a1..9e42ec99dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,66 @@ run `make changelog` to generate content +1.59.0 (2024-07-10) +------------------- + +### Backend Changes + +#### β›” Breaking Changes + +* Update opentelemetry-go to v1.28.0 and refactor references to semantic conventions ([@renovate-bot](https://github.com/renovate-bot) in [#5698](https://github.com/jaegertracing/jaeger/pull/5698)) + +#### ✨ New Features + +* Run jaeger-es-index-cleaner and jaeger-es-rollover locally ([@hellspawn679](https://github.com/hellspawn679) in [#5714](https://github.com/jaegertracing/jaeger/pull/5714)) +* [tracegen] allow use of adaptive sampling ([@yurishkuro](https://github.com/yurishkuro) in [#5718](https://github.com/jaegertracing/jaeger/pull/5718)) +* [v2] add v1 factory converter to v2 storage factory ([@james-ryans](https://github.com/james-ryans) in [#5497](https://github.com/jaegertracing/jaeger/pull/5497)) +* Upgrade badger v3->badger v4 ([@hellspawn679](https://github.com/hellspawn679) in [#5619](https://github.com/jaegertracing/jaeger/pull/5619)) + +#### 🐞 Bug fixes, Minor Improvements + +* Cleanup the prometheus config ([@FlamingSaint](https://github.com/FlamingSaint) in [#5720](https://github.com/jaegertracing/jaeger/pull/5720)) +* Upgrade microsim to v0.4.1 ([@FlamingSaint](https://github.com/FlamingSaint) in [#5702](https://github.com/jaegertracing/jaeger/pull/5702)) +* Add all mocks to mockery config file and regenerate ([@danish9039](https://github.com/danish9039) in [#5626](https://github.com/jaegertracing/jaeger/pull/5626)) +* Add better logging options ([@yurishkuro](https://github.com/yurishkuro) in [#5675](https://github.com/jaegertracing/jaeger/pull/5675)) +* Restore "operation" name in the metrics response ([@yurishkuro](https://github.com/yurishkuro) in [#5673](https://github.com/jaegertracing/jaeger/pull/5673)) +* Add flag for custom authenticators in cassandra storage ([@hellspawn679](https://github.com/hellspawn679) in [#5628](https://github.com/jaegertracing/jaeger/pull/5628)) +* Rename strategy store to sampling strategy provider ([@yurishkuro](https://github.com/yurishkuro) in [#5634](https://github.com/jaegertracing/jaeger/pull/5634)) +* [query] avoid errors when closing shared listener ([@vermaaatul07](https://github.com/vermaaatul07) in [#5559](https://github.com/jaegertracing/jaeger/pull/5559)) +* Bump github.com/golangci/golangci-lint from 1.55.2 to 1.59.1 and fix linter errors ([@FlamingSaint](https://github.com/FlamingSaint) in [#5579](https://github.com/jaegertracing/jaeger/pull/5579)) +* Fix binary path in package-deploy.sh ([@yurishkuro](https://github.com/yurishkuro) in [#5561](https://github.com/jaegertracing/jaeger/pull/5561)) + +#### 🚧 Experimental Features + +* Implement telemetery struct for v1 components initialization ([@Wise-Wizard](https://github.com/Wise-Wizard) in [#5695](https://github.com/jaegertracing/jaeger/pull/5695)) +* Support default configs for storage backends ([@yurishkuro](https://github.com/yurishkuro) in [#5691](https://github.com/jaegertracing/jaeger/pull/5691)) +* Simplify configs organization ([@yurishkuro](https://github.com/yurishkuro) in [#5690](https://github.com/jaegertracing/jaeger/pull/5690)) +* Create metrics.factory adapter for otel metrics ([@Wise-Wizard](https://github.com/Wise-Wizard) in [#5661](https://github.com/jaegertracing/jaeger/pull/5661)) + +#### πŸ‘· CI Improvements + +* Apply 'latest' tag to latest published snapshot images ([@yurishkuro](https://github.com/yurishkuro) in [#5724](https://github.com/jaegertracing/jaeger/pull/5724)) +* [bug] use correct argument as jaeger-version ([@yurishkuro](https://github.com/yurishkuro) in [#5716](https://github.com/jaegertracing/jaeger/pull/5716)) +* Add spm integration tests ([@hellspawn679](https://github.com/hellspawn679) in [#5640](https://github.com/jaegertracing/jaeger/pull/5640)) +* Add spm build to ci ([@yurishkuro](https://github.com/yurishkuro) in [#5663](https://github.com/jaegertracing/jaeger/pull/5663)) +* Remove unnecessary .nocover files ([@yurishkuro](https://github.com/yurishkuro) in [#5642](https://github.com/jaegertracing/jaeger/pull/5642)) +* Add tests for anonymizer/app/query. ([@shanukun](https://github.com/shanukun) in [#5638](https://github.com/jaegertracing/jaeger/pull/5638)) +* Add alternate way to install gotip ([@EraKin575](https://github.com/EraKin575) in [#5618](https://github.com/jaegertracing/jaeger/pull/5618)) +* Add semver to dependencies ([@danish9039](https://github.com/danish9039) in [#5590](https://github.com/jaegertracing/jaeger/pull/5590)) +* Create config file for mockery instead of using explicit cli flags in the makefile ([@jesslourenco](https://github.com/jesslourenco) in [#5623](https://github.com/jaegertracing/jaeger/pull/5623)) +* Update renovate bot to not apply patches to e2e test dependencies ([@DustyMMiller](https://github.com/DustyMMiller) in [#5622](https://github.com/jaegertracing/jaeger/pull/5622)) +* Require renovate bot to run go mod tidy ([@yurishkuro](https://github.com/yurishkuro) in [#5612](https://github.com/jaegertracing/jaeger/pull/5612)) +* Fix new warnings from the linter upgrade ([@WaterLemons2k](https://github.com/WaterLemons2k) in [#5589](https://github.com/jaegertracing/jaeger/pull/5589)) +* [ci] validate that generated mocks are up to date ([@yurishkuro](https://github.com/yurishkuro) in [#5568](https://github.com/jaegertracing/jaeger/pull/5568)) + +### πŸ“Š UI Changes + +#### 🐞 Bug fixes, Minor Improvements + +* Add escaped example to tag search help popup ([@yurishkuro](https://github.com/yurishkuro) in [#2354](https://github.com/jaegertracing/jaeger-ui/pull/2354)) + + + 1.58.1 (2024-06-22) ------------------- diff --git a/RELEASE.md b/RELEASE.md index 16055c03d93..559a836b7f7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -60,8 +60,8 @@ Here are the release managers for future versions with the tentative release dat | Version | Release Manager | Tentative release date | |---------|-----------------|------------------------| -| 1.59.0 | @joe-elliott | 3 July 2024 | | 1.60.0 | @jkowall | 7 August 2024 | | 1.61.0 | @yurishkuro | 3 September 2024 | | 1.62.0 | @albertteoh | 2 October 2024 | | 1.63.0 | @pavolloffay | 5 November 2024 | +| 1.64.0 | @joe-elliott | 4 December 2024 | diff --git a/jaeger-ui b/jaeger-ui index 560c749b481..1704a9a66ae 160000 --- a/jaeger-ui +++ b/jaeger-ui @@ -1 +1 @@ -Subproject commit 560c749b481f8244bf76b0afe001174fa9ce11f5 +Subproject commit 1704a9a66ae780ec6bb2f524116176aa9c8a23f8 From 336a615424027d6f59916e4e71ddd8e10c1e9754 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 10 Jul 2024 21:25:56 +0200 Subject: [PATCH 30/52] Update actions/setup-go action to v5.0.2 (#5727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://togithub.com/actions/setup-go) | action | patch | `v5.0.1` -> `v5.0.2` | --- ### Release Notes
actions/setup-go (actions/setup-go) ### [`v5.0.2`](https://togithub.com/actions/setup-go/compare/v5.0.1...v5.0.2) [Compare Source](https://togithub.com/actions/setup-go/compare/v5.0.1...v5.0.2)
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- .github/actions/setup-go-tip/action.yml | 2 +- .github/workflows/ci-all-in-one-build.yml | 2 +- .github/workflows/ci-badger.yaml | 2 +- .github/workflows/ci-build-binaries.yml | 2 +- .github/workflows/ci-build-spm.yml | 2 +- .github/workflows/ci-cassandra.yml | 2 +- .github/workflows/ci-crossdock.yml | 2 +- .github/workflows/ci-docker-build.yml | 2 +- .github/workflows/ci-elasticsearch.yml | 2 +- .github/workflows/ci-grpc.yml | 2 +- .github/workflows/ci-hotrod.yml | 2 +- .github/workflows/ci-kafka.yml | 2 +- .github/workflows/ci-lint-checks.yaml | 2 +- .github/workflows/ci-opensearch.yml | 2 +- .github/workflows/ci-protogen-tests.yml | 2 +- .github/workflows/ci-release-testing.yml | 2 +- .github/workflows/ci-release.yml | 2 +- .github/workflows/ci-unit-tests.yml | 2 +- .github/workflows/fossa.yml | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/actions/setup-go-tip/action.yml b/.github/actions/setup-go-tip/action.yml index 5b56d1ff801..4d0be775881 100644 --- a/.github/actions/setup-go-tip/action.yml +++ b/.github/actions/setup-go-tip/action.yml @@ -43,7 +43,7 @@ runs: # This requires Go toolchain, so install it first. - name: Install Go toolchain if: steps.download.outputs.success == 'false' - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-all-in-one-build.yml b/.github/workflows/ci-all-in-one-build.yml index c8e0dd71745..9cc91cb8fc2 100644 --- a/.github/workflows/ci-all-in-one-build.yml +++ b/.github/workflows/ci-all-in-one-build.yml @@ -42,7 +42,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-badger.yaml b/.github/workflows/ci-badger.yaml index 82d23b76621..e91e031409d 100644 --- a/.github/workflows/ci-badger.yaml +++ b/.github/workflows/ci-badger.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-build-binaries.yml b/.github/workflows/ci-build-binaries.yml index 56255ed8b17..3d2fa327fd6 100644 --- a/.github/workflows/ci-build-binaries.yml +++ b/.github/workflows/ci-build-binaries.yml @@ -50,7 +50,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-build-spm.yml b/.github/workflows/ci-build-spm.yml index 54095cb187f..8f58de52f91 100644 --- a/.github/workflows/ci-build-spm.yml +++ b/.github/workflows/ci-build-spm.yml @@ -32,7 +32,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-cassandra.yml b/.github/workflows/ci-cassandra.yml index 97501f55a7f..f5455d52113 100644 --- a/.github/workflows/ci-cassandra.yml +++ b/.github/workflows/ci-cassandra.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-crossdock.yml b/.github/workflows/ci-crossdock.yml index 26f28d87446..23938fb4802 100644 --- a/.github/workflows/ci-crossdock.yml +++ b/.github/workflows/ci-crossdock.yml @@ -33,7 +33,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml index 160c6d156f9..227ee0aff02 100644 --- a/.github/workflows/ci-docker-build.yml +++ b/.github/workflows/ci-docker-build.yml @@ -33,7 +33,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 21c381bad06..c80dc0f8686 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -49,7 +49,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-grpc.yml b/.github/workflows/ci-grpc.yml index d21c59e7fdf..a366488f267 100644 --- a/.github/workflows/ci-grpc.yml +++ b/.github/workflows/ci-grpc.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-hotrod.yml b/.github/workflows/ci-hotrod.yml index 32474c2cab0..16f39344404 100644 --- a/.github/workflows/ci-hotrod.yml +++ b/.github/workflows/ci-hotrod.yml @@ -32,7 +32,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-kafka.yml b/.github/workflows/ci-kafka.yml index 5d570e3aa4c..eb2530dc210 100644 --- a/.github/workflows/ci-kafka.yml +++ b/.github/workflows/ci-kafka.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-lint-checks.yaml b/.github/workflows/ci-lint-checks.yaml index 41c30b023ed..7233689a50c 100644 --- a/.github/workflows/ci-lint-checks.yaml +++ b/.github/workflows/ci-lint-checks.yaml @@ -39,7 +39,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-opensearch.yml index 037003e2145..50ee0586386 100644 --- a/.github/workflows/ci-opensearch.yml +++ b/.github/workflows/ci-opensearch.yml @@ -46,7 +46,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-protogen-tests.yml b/.github/workflows/ci-protogen-tests.yml index 8aec34caa1c..99cde657896 100644 --- a/.github/workflows/ci-protogen-tests.yml +++ b/.github/workflows/ci-protogen-tests.yml @@ -28,7 +28,7 @@ jobs: with: submodules: recursive - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-release-testing.yml b/.github/workflows/ci-release-testing.yml index 06c25c10ad4..9d2295f2971 100644 --- a/.github/workflows/ci-release-testing.yml +++ b/.github/workflows/ci-release-testing.yml @@ -33,7 +33,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 1c79cfd2228..580c6bc6606 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -42,7 +42,7 @@ jobs: run: | git fetch --prune --unshallow --tags - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x diff --git a/.github/workflows/ci-unit-tests.yml b/.github/workflows/ci-unit-tests.yml index 8863da6c7e2..daa4e4840cf 100644 --- a/.github/workflows/ci-unit-tests.yml +++ b/.github/workflows/ci-unit-tests.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x cache-dependency-path: ./go.sum diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 3be346b137c..d69d008d23f 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x From 7a158cbcd80eee6f2ad97bf097707f8d1639578f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 10 Jul 2024 23:24:17 +0200 Subject: [PATCH 31/52] Replace pinned Jaeger version with a parameter/default=latest (#5729) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | jaegertracing/example-hotrod | minor | `1.58` -> `1.59` | --- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). --------- Signed-off-by: Mend Renovate Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- plugin/storage/scylladb/docker-compose.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugin/storage/scylladb/docker-compose.yml b/plugin/storage/scylladb/docker-compose.yml index eecfb83fbba..2e5a69c2a44 100644 --- a/plugin/storage/scylladb/docker-compose.yml +++ b/plugin/storage/scylladb/docker-compose.yml @@ -1,10 +1,16 @@ +# docker compose file to test Scylla with Jaeger. + +# Disclaimer: This defaults to using 'latest' image tag for Jaeger images, +# which can be stale in your local repository. In case of issues try running +# against the actual Jaeger version like JAEGER_VERSION=1.59.0. + networks: jaeger-scylladb: services: collector: restart: unless-stopped - image: jaegertracing/jaeger-collector:1.58 + image: jaegertracing/jaeger-collector:${JAEGER_VERSION:-latest} environment: SPAN_STORAGE_TYPE: cassandra CASSANDRA_SERVERS: scylladb @@ -15,7 +21,7 @@ services: - cassandra-schema web: - image: jaegertracing/jaeger-query:1.58 + image: jaegertracing/jaeger-query:${JAEGER_VERSION:-latest} restart: unless-stopped ports: - 16686:16686 @@ -30,7 +36,7 @@ services: - cassandra-schema cassandra-schema: - image: jaegertracing/jaeger-cassandra-schema:1.58 + image: jaegertracing/jaeger-cassandra-schema:${JAEGER_VERSION:-latest} environment: CASSANDRA_PROTOCOL_VERSION: 4 CASSANDRA_VERSION: 4 @@ -77,7 +83,7 @@ services: - jaeger-scylladb hotrod: - image: jaegertracing/example-hotrod:1.58 + image: jaegertracing/example-hotrod:${JAEGER_VERSION:-latest} ports: - 8080:8080 command: [ "all" ] From c6d7e1724e55d82540a5144606b0e5f370b256cd Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 12 Jul 2024 01:15:40 -0300 Subject: [PATCH 32/52] [hotrod] Fix connectivity in docker compose (#5734) ## Which problem is this PR solving? - HotROD demo stopped working. Since v0.105 the OTEL Collector components default hostname to 'localhost. However, that does not work inside a Docker container (at least on MacOS & Docker Desktop). ## Description of the changes - Make OTLP receivers listen on all IPs (0.0.0.0) - Unrelated, but added a mermaid diagram for SPM, as I needed it for the slides for a presentation ## How was this change tested? - Go through HotROD demo workflow --------- Signed-off-by: Yuri Shkuro --- .../integration/storagecleaner/README.md | 32 +-------------- docker-compose/monitor/README.md | 41 ++++++++++++++++++- examples/hotrod/docker-compose.yml | 5 +++ 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/cmd/jaeger/internal/integration/storagecleaner/README.md b/cmd/jaeger/internal/integration/storagecleaner/README.md index a2011cddb06..08860ac4b24 100644 --- a/cmd/jaeger/internal/integration/storagecleaner/README.md +++ b/cmd/jaeger/internal/integration/storagecleaner/README.md @@ -1,37 +1,10 @@ # storage_cleaner -This module implements an extension that allows purging the backend storage by making an HTTP POST request to it. +This module implements an extension that allows purging the backend storage by making an HTTP POST request to it. The storage_cleaner extension is intended to be used only in tests, providing a way to clear the storage between test runs. Making a POST request to the exposed endpoint will delete all data in storage. - -```mermaid -flowchart LR - Receiver --> Processor - Processor --> Exporter - JaegerStorageExension -->|"(1) get storage"| Exporter - Exporter -->|"(2) write trace"| Storage - - E2E_test -->|"(1) POST /purge"| HTTP_endpoint - JaegerStorageExension -->|"(2) getStorage()"| HTTP_endpoint - HTTP_endpoint -.->|"(3) storage.(*storage.Purger).Purge()"| Storage - - subgraph Jaeger Collector - Receiver - Processor - Exporter - - Storage - StorageCleanerExtension - HTTP_endpoint - subgraph JaegerStorageExension - Storage - end - subgraph StorageCleanerExtension - HTTP_endpoint - end - end -``` +See [Architecture Diagram](../README.md) in the parent directory. # Getting Started @@ -44,4 +17,3 @@ extensions: storage_cleaner: trace_storage: storage_name ``` - diff --git a/docker-compose/monitor/README.md b/docker-compose/monitor/README.md index 311fc10ca75..df8c30adb36 100644 --- a/docker-compose/monitor/README.md +++ b/docker-compose/monitor/README.md @@ -24,6 +24,45 @@ The following diagram illustrates the relationship between these components: ![SPM diagram](./diagram.png) +```mermaid +flowchart LR + SDK -->|traces| Receiver + Receiver --> MG + Receiver --> Batch + MG --> ExpMetrics + Batch --> ExpTraces + ExpMetrics -->|metrics| Prometheus[(Prometheus)] + ExpTraces -->|traces| Jaeger[Jaeger + Collector] + Prometheus -.-> JaegerUI + Jaeger --> Storage[(Storage)] + Storage -.-> JaegerUI[Jaeger + Query + and UI] + + style Prometheus fill:red,color:white + style Jaeger fill:blue,color:white + style JaegerUI fill:blue,color:white + style Storage fill:gray,color:white + + subgraph Application + SDK[OTel + SDK] + end + + subgraph OTEL[OTel Collector] + Receiver + Batch + MG[Span + Metrics + Connector] + ExpTraces[Traces + Exporter] + ExpMetrics[Metrics + Exporter] + end +``` + # Getting Started ## Quickstart @@ -160,7 +199,7 @@ quantile = 'quantile=' floatValue - The quantile to compute the latency 'P' value. Valid range (0,1]. - Mandatory for 'latencies' type. -groupByOperation = 'groupByOperation=' boolValue +groupByOperation = 'groupByOperation=' boolValue boolValue = '1' | 't' | 'T' | 'true' | 'TRUE' | 'True' | 0 | 'f' | 'F' | 'false' | 'FALSE' | 'False' - A boolean value which will determine if the metrics query will also group by operation. - Optional with default: false diff --git a/examples/hotrod/docker-compose.yml b/examples/hotrod/docker-compose.yml index db58cb2860d..8a0e2a90368 100644 --- a/examples/hotrod/docker-compose.yml +++ b/examples/hotrod/docker-compose.yml @@ -8,9 +8,14 @@ services: image: jaegertracing/all-in-one:${JAEGER_VERSION:-latest} ports: - "16686:16686" + - "4317:4317" - "4318:4318" environment: - LOG_LEVEL=debug + # Since v0.105 the OTEL Collector components default hostname to 'localhost'. + # However, that does not work inside a Docker container, so we listen on all IPs. + - COLLECTOR_OTLP_GRPC_HOST_PORT=0.0.0.0:4317 + - COLLECTOR_OTLP_HTTP_HOST_PORT=0.0.0.0:4318 networks: - jaeger-example hotrod: From eae8e66a758f7da54c53c28f91126aa8593af75d Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 12 Jul 2024 12:08:21 -0300 Subject: [PATCH 33/52] Block patch upgrades for GH actions (#5738) ## Which problem is this PR solving? - Patch upgrades for GH actions are unnecessary noise ## Description of the changes - Restrict updates to major/minor only Signed-off-by: Yuri Shkuro --- renovate.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renovate.json b/renovate.json index 5a2fc537ab4..2f52d689897 100644 --- a/renovate.json +++ b/renovate.json @@ -34,6 +34,11 @@ "matchManagers": ["github-actions"], "groupName": "github-actions deps" }, + { + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["major", "patch", "digest"], + "enabled": false + }, { "matchManagers": ["gomod"], "matchSourceUrlPrefixes": [ From a54e2a56c8357fb7d2d4eb81dba6d2def96f65af Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 13 Jul 2024 13:04:36 -0300 Subject: [PATCH 34/52] Make OTLP receiver listen on all IPs again (#5739) ## Which problem is this PR solving? - Resolves #5737 ## Description of the changes - Revert #5734 - Default OTLP receiver endpoints to `:port` instead of relying on OTEL Collector defaults - Clean up tests to use ephemeral ports when possible ## How was this change tested? - Tested similar to #5734 by using `COLLECTOR_OTLP_HTTP_HOST_PORT=:4318` --------- Signed-off-by: Yuri Shkuro --- cmd/collector/app/flags/flags.go | 4 +- cmd/collector/app/server/grpc_test.go | 1 - .../internal/extension/jaegerquery/config.go | 12 +- .../internal/extension/jaegerquery/factory.go | 10 +- .../internal/extension/jaegerquery/server.go | 8 +- .../extension/jaegerquery/server_test.go | 33 +++- cmd/query/app/handler_archive_test.go | 14 +- cmd/query/app/handler_deps_test.go | 19 +- cmd/query/app/http_handler_test.go | 169 ++++++------------ cmd/query/app/query_parser_test.go | 3 +- cmd/query/app/server.go | 17 +- cmd/query/app/server_test.go | 25 ++- cmd/remote-storage/app/server_test.go | 9 +- examples/hotrod/docker-compose.yml | 4 - internal/grpctest/reflection.go | 1 - internal/grpctest/reflection_test.go | 1 - 16 files changed, 156 insertions(+), 174 deletions(-) diff --git a/cmd/collector/app/flags/flags.go b/cmd/collector/app/flags/flags.go index 8b3203b853c..c77814267d7 100644 --- a/cmd/collector/app/flags/flags.go +++ b/cmd/collector/app/flags/flags.go @@ -194,9 +194,9 @@ func AddFlags(flags *flag.FlagSet) { addGRPCFlags(flags, grpcServerFlagsCfg, ports.PortToHostPort(ports.CollectorGRPC)) flags.Bool(flagCollectorOTLPEnabled, true, "Enables OpenTelemetry OTLP receiver on dedicated HTTP and gRPC ports") - addHTTPFlags(flags, otlpServerFlagsCfg.HTTP, "") + addHTTPFlags(flags, otlpServerFlagsCfg.HTTP, ":4318") corsOTLPFlags.AddFlags(flags) - addGRPCFlags(flags, otlpServerFlagsCfg.GRPC, "") + addGRPCFlags(flags, otlpServerFlagsCfg.GRPC, ":4317") flags.String(flagZipkinHTTPHostPort, "", "The host:port (e.g. 127.0.0.1:9411 or :9411) of the collector's Zipkin server (disabled by default)") flags.Bool(flagZipkinKeepAliveEnabled, true, "KeepAlive configures allow Keep-Alive for Zipkin HTTP server (enabled by default)") diff --git a/cmd/collector/app/server/grpc_test.go b/cmd/collector/app/server/grpc_test.go index 487c6bc0216..27855c3ee3e 100644 --- a/cmd/collector/app/server/grpc_test.go +++ b/cmd/collector/app/server/grpc_test.go @@ -129,7 +129,6 @@ func TestCollectorReflection(t *testing.T) { grpctest.ReflectionServiceValidator{ HostPort: params.HostPortActual, - Server: server, ExpectedServices: []string{ "jaeger.api_v2.CollectorService", "jaeger.api_v2.SamplingManager", diff --git a/cmd/jaeger/internal/extension/jaegerquery/config.go b/cmd/jaeger/internal/extension/jaegerquery/config.go index e5640c2710b..ec5de1bb69c 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/config.go +++ b/cmd/jaeger/internal/extension/jaegerquery/config.go @@ -6,6 +6,7 @@ package jaegerquery import ( "github.com/asaskevich/govalidator" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" queryApp "github.com/jaegertracing/jaeger/cmd/query/app" @@ -18,10 +19,13 @@ var _ component.ConfigValidator = (*Config)(nil) type Config struct { queryApp.QueryOptionsBase `mapstructure:",squash"` - TraceStoragePrimary string `valid:"required" mapstructure:"trace_storage"` - TraceStorageArchive string `valid:"optional" mapstructure:"trace_storage_archive"` - confighttp.ServerConfig `mapstructure:",squash"` - Tenancy tenancy.Options `mapstructure:"multi_tenancy"` + TraceStoragePrimary string `valid:"required" mapstructure:"trace_storage"` + TraceStorageArchive string `valid:"optional" mapstructure:"trace_storage_archive"` + + HTTP confighttp.ServerConfig `mapstructure:",squash"` + GRPC configgrpc.ServerConfig `mapstructure:",squash"` + + Tenancy tenancy.Options `mapstructure:"multi_tenancy"` } func (cfg *Config) Validate() error { diff --git a/cmd/jaeger/internal/extension/jaegerquery/factory.go b/cmd/jaeger/internal/extension/jaegerquery/factory.go index 93d35781e10..9d50bc55ea5 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/factory.go +++ b/cmd/jaeger/internal/extension/jaegerquery/factory.go @@ -7,7 +7,9 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/extension" "github.com/jaegertracing/jaeger/ports" @@ -25,9 +27,15 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ - ServerConfig: confighttp.ServerConfig{ + HTTP: confighttp.ServerConfig{ Endpoint: ports.PortToHostPort(ports.QueryHTTP), }, + GRPC: configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: ports.PortToHostPort(ports.QueryGRPC), + Transport: confignet.TransportTypeTCP, + }, + }, } } diff --git a/cmd/jaeger/internal/extension/jaegerquery/server.go b/cmd/jaeger/internal/extension/jaegerquery/server.go index a512c8ed07f..d4dfa53715d 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server.go @@ -18,7 +18,6 @@ import ( "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/plugin/metrics/disabled" - "github.com/jaegertracing/jaeger/ports" ) var ( @@ -127,9 +126,10 @@ func (s *server) makeQueryOptions() *queryApp.QueryOptions { return &queryApp.QueryOptions{ QueryOptionsBase: s.config.QueryOptionsBase, - // TODO expose via config - HTTPHostPort: ports.PortToHostPort(ports.QueryHTTP), - GRPCHostPort: ports.PortToHostPort(ports.QueryGRPC), + // TODO utilize OTEL helpers for creating HTTP/GRPC servers + HTTPHostPort: s.config.HTTP.Endpoint, + GRPCHostPort: s.config.GRPC.NetAddr.Endpoint, + // TODO handle TLS } } diff --git a/cmd/jaeger/internal/extension/jaegerquery/server_test.go b/cmd/jaeger/internal/extension/jaegerquery/server_test.go index 36cc4d82c4c..73d165ed491 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server_test.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server_test.go @@ -6,7 +6,9 @@ package jaegerquery import ( "context" "fmt" + "net/http" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -17,6 +19,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" + "github.com/jaegertracing/jaeger/internal/grpctest" "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/storage" @@ -160,14 +163,40 @@ func TestServerStart(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { telemetrySettings := component.TelemetrySettings{ - Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())), + Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())), + ReportStatus: func(*component.StatusEvent) {}, } + tt.config.HTTP.Endpoint = ":0" + tt.config.GRPC.NetAddr.Endpoint = ":0" server := newServer(tt.config, telemetrySettings) err := server.Start(context.Background(), host) - if tt.expectedErr == "" { require.NoError(t, err) defer server.Shutdown(context.Background()) + // We need to wait for servers to become available. + // Otherwise, we could call shutdown before the servers are even started, + // which could cause flaky code coverage by going through error cases. + require.Eventually(t, + func() bool { + resp, err := http.Get(fmt.Sprintf("http://%s/", server.server.HTTPAddr())) + if err != nil { + return false + } + defer resp.Body.Close() + return resp.StatusCode == http.StatusOK + }, + 10*time.Second, + 100*time.Millisecond, + "server not started") + grpctest.ReflectionServiceValidator{ + HostPort: server.server.GRPCAddr(), + ExpectedServices: []string{ + "jaeger.api_v2.QueryService", + "jaeger.api_v3.QueryService", + "jaeger.api_v2.metrics.MetricsQueryService", + "grpc.health.v1.Health", + }, + }.Execute(t) } else { require.ErrorContains(t, err, tt.expectedErr) } diff --git a/cmd/query/app/handler_archive_test.go b/cmd/query/app/handler_archive_test.go index 9b48941d0cb..82f0daa721c 100644 --- a/cmd/query/app/handler_archive_test.go +++ b/cmd/query/app/handler_archive_test.go @@ -48,7 +48,7 @@ func TestGetArchivedTrace_NotFound(t *testing.T) { } { tc := tc // capture loop var t.Run(tc.name, func(t *testing.T) { - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Once() var response structuredResponse @@ -66,7 +66,7 @@ func TestGetArchivedTraceSuccess(t *testing.T) { mockReader := &spanstoremocks.Reader{} mockReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Once() - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { // make main reader return NotFound ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Once() @@ -81,7 +81,7 @@ func TestGetArchivedTraceSuccess(t *testing.T) { // Test failure in parsing trace ID. func TestArchiveTrace_BadTraceID(t *testing.T) { - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { var response structuredResponse err := postJSON(ts.server.URL+"/api/archive/badtraceid", []string{}, &response) require.Error(t, err) @@ -95,7 +95,7 @@ func TestArchiveTrace_TraceNotFound(t *testing.T) { Return(nil, spanstore.ErrTraceNotFound).Once() mockWriter := &spanstoremocks.Writer{} // Not actually going to write the trace, so no need to define mockWriter action - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { // make main reader return NotFound ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Once() @@ -106,7 +106,7 @@ func TestArchiveTrace_TraceNotFound(t *testing.T) { } func TestArchiveTrace_NoStorage(t *testing.T) { - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { var response structuredResponse err := postJSON(ts.server.URL+"/api/archive/"+mockTraceID.String(), []string{}, &response) require.EqualError(t, err, `500 error from server: {"data":null,"total":0,"limit":0,"offset":0,"errors":[{"code":500,"msg":"archive span storage was not configured"}]}`+"\n") @@ -117,7 +117,7 @@ func TestArchiveTrace_Success(t *testing.T) { mockWriter := &spanstoremocks.Writer{} mockWriter.On("WriteSpan", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("*model.Span")). Return(nil).Times(2) - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Once() var response structuredResponse @@ -130,7 +130,7 @@ func TestArchiveTrace_WriteErrors(t *testing.T) { mockWriter := &spanstoremocks.Writer{} mockWriter.On("WriteSpan", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("*model.Span")). Return(errors.New("cannot save")).Times(2) - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Once() var response structuredResponse diff --git a/cmd/query/app/handler_deps_test.go b/cmd/query/app/handler_deps_test.go index 182e149f94d..9d6e064855d 100644 --- a/cmd/query/app/handler_deps_test.go +++ b/cmd/query/app/handler_deps_test.go @@ -310,8 +310,7 @@ func TestFilterDependencies(t *testing.T) { } func TestGetDependenciesSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) expectedDependencies := []model.DependencyLink{{Parent: "killer", Child: "queen", CallCount: 12}} endTs := time.Unix(0, 1476374248550*millisToNanosMultiplier) ts.dependencyReader.On("GetDependencies", @@ -332,10 +331,12 @@ func TestGetDependenciesSuccess(t *testing.T) { } func TestGetDependenciesCassandraFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) endTs := time.Unix(0, 1476374248550*millisToNanosMultiplier) - ts.dependencyReader.On("GetDependencies", endTs, defaultDependencyLookbackDuration).Return(nil, errStorage).Times(1) + ts.dependencyReader.On("GetDependencies", + mock.Anything, // context + endTs, + defaultDependencyLookbackDuration).Return(nil, errStorage).Times(1) var response structuredResponse err := getJSON(ts.server.URL+"/api/dependencies?endTs=1476374248550&service=testing", &response) @@ -343,18 +344,14 @@ func TestGetDependenciesCassandraFailure(t *testing.T) { } func TestGetDependenciesEndTimeParsingFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() - + ts := initializeTestServer(t) var response structuredResponse err := getJSON(ts.server.URL+"/api/dependencies?endTs=shazbot&service=testing", &response) require.Error(t, err) } func TestGetDependenciesLookbackParsingFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() - + ts := initializeTestServer(t) var response structuredResponse err := getJSON(ts.server.URL+"/api/dependencies?endTs=1476374248550&service=testing&lookback=shazbot", &response) require.Error(t, err) diff --git a/cmd/query/app/http_handler_test.go b/cmd/query/app/http_handler_test.go index 3034f6595d0..680420023eb 100644 --- a/cmd/query/app/http_handler_test.go +++ b/cmd/query/app/http_handler_test.go @@ -38,7 +38,8 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" "go.uber.org/zap" - "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest" + "go.uber.org/zap/zaptest/observer" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" "github.com/jaegertracing/jaeger/model" @@ -102,8 +103,9 @@ type structuredTraceResponse struct { Errors []structuredError `json:"errors"` } -func initializeTestServerWithHandler(queryOptions querysvc.QueryServiceOptions, options ...HandlerOption) *testServer { +func initializeTestServerWithHandler(t *testing.T, queryOptions querysvc.QueryServiceOptions, options ...HandlerOption) *testServer { return initializeTestServerWithOptions( + t, &tenancy.Manager{}, queryOptions, append( @@ -119,23 +121,33 @@ func initializeTestServerWithHandler(queryOptions querysvc.QueryServiceOptions, ) } -func initializeTestServerWithOptions(tenancyMgr *tenancy.Manager, queryOptions querysvc.QueryServiceOptions, options ...HandlerOption) *testServer { +func initializeTestServerWithOptions( + t *testing.T, + tenancyMgr *tenancy.Manager, + queryOptions querysvc.QueryServiceOptions, + options ...HandlerOption, +) *testServer { + options = append(options, HandlerOptions.Logger(zaptest.NewLogger(t))) readStorage := &spanstoremocks.Reader{} dependencyStorage := &depsmocks.Reader{} qs := querysvc.NewQueryService(readStorage, dependencyStorage, queryOptions) r := NewRouter() handler := NewAPIHandler(qs, tenancyMgr, options...) handler.RegisterRoutes(r) - return &testServer{ + ts := &testServer{ server: httptest.NewServer(tenancy.ExtractTenantHTTPHandler(tenancyMgr, r)), spanReader: readStorage, dependencyReader: dependencyStorage, handler: handler, } + t.Cleanup(func() { + ts.server.Close() + }) + return ts } -func initializeTestServer(options ...HandlerOption) *testServer { - return initializeTestServerWithHandler(querysvc.QueryServiceOptions{}, options...) +func initializeTestServer(t *testing.T, options ...HandlerOption) *testServer { + return initializeTestServerWithHandler(t, querysvc.QueryServiceOptions{}, options...) } type testServer struct { @@ -145,15 +157,13 @@ type testServer struct { server *httptest.Server } -func withTestServer(doTest func(s *testServer), queryOptions querysvc.QueryServiceOptions, options ...HandlerOption) { - ts := initializeTestServerWithOptions(&tenancy.Manager{}, queryOptions, options...) - defer ts.server.Close() +func withTestServer(t *testing.T, doTest func(s *testServer), queryOptions querysvc.QueryServiceOptions, options ...HandlerOption) { + ts := initializeTestServerWithOptions(t, &tenancy.Manager{}, queryOptions, options...) doTest(ts) } func TestGetTraceSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Once() @@ -163,44 +173,20 @@ func TestGetTraceSuccess(t *testing.T) { assert.Empty(t, response.Errors) } -type logData struct { - e zapcore.Entry - f []zapcore.Field -} - -type testLogger struct { - logs *[]logData -} - -func (testLogger) Enabled(zapcore.Level) bool { return true } -func (l testLogger) With([]zapcore.Field) zapcore.Core { return l } -func (testLogger) Sync() error { return nil } -func (l testLogger) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry { - return ce.AddCore(e, l) -} - -func (l testLogger) Write(e zapcore.Entry, f []zapcore.Field) error { - *l.logs = append(*l.logs, logData{e: e, f: f}) - return nil -} - func TestLogOnServerError(t *testing.T) { - l := &testLogger{ - logs: &[]logData{}, - } + zapCore, logs := observer.New(zap.InfoLevel) + logger := zap.New(zapCore) readStorage := &spanstoremocks.Reader{} dependencyStorage := &depsmocks.Reader{} qs := querysvc.NewQueryService(readStorage, dependencyStorage, querysvc.QueryServiceOptions{}) - apiHandlerOptions := []HandlerOption{ - HandlerOptions.Logger(zap.New(l)), - } - h := NewAPIHandler(qs, &tenancy.Manager{}, apiHandlerOptions...) + h := NewAPIHandler(qs, &tenancy.Manager{}, HandlerOptions.Logger(logger)) e := errors.New("test error") h.handleError(&httptest.ResponseRecorder{}, e, http.StatusInternalServerError) - require.Len(t, *l.logs, 1) - assert.Equal(t, "HTTP handler, Internal Server Error", (*l.logs)[0].e.Message) - assert.Len(t, (*l.logs)[0].f, 1) - assert.Equal(t, e, (*l.logs)[0].f[0].Interface) + require.Len(t, logs.All(), 1) + log := logs.All()[0] + assert.Equal(t, "HTTP handler, Internal Server Error", log.Message) + require.Len(t, log.Context, 1) + assert.Equal(t, e, log.Context[0].Interface) } // httpResponseErrWriter implements the http.ResponseWriter interface that returns an error on Write. @@ -321,8 +307,7 @@ func TestGetTrace(t *testing.T) { jTracer := jtracer.JTracer{OTEL: tracerProvider} defer tracerProvider.Shutdown(context.Background()) - ts := initializeTestServer(HandlerOptions.Tracer(jTracer.OTEL)) - defer ts.server.Close() + ts := initializeTestServer(t, HandlerOptions.Tracer(jTracer.OTEL)) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), model.NewTraceID(0, 0x123456abc)). Return(makeMockTrace(t), nil).Once() @@ -343,8 +328,7 @@ func TestGetTrace(t *testing.T) { } func TestGetTraceDBFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, errStorage).Once() @@ -354,8 +338,7 @@ func TestGetTraceDBFailure(t *testing.T) { } func TestGetTraceNotFound(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Once() @@ -366,13 +349,13 @@ func TestGetTraceNotFound(t *testing.T) { func TestGetTraceAdjustmentFailure(t *testing.T) { ts := initializeTestServerWithHandler( + t, querysvc.QueryServiceOptions{ Adjuster: adjuster.Func(func(trace *model.Trace) (*model.Trace, error) { return trace, errAdjustment }), }, ) - defer ts.server.Close() ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Once() @@ -384,8 +367,7 @@ func TestGetTraceAdjustmentFailure(t *testing.T) { } func TestGetTraceBadTraceID(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) var response structuredResponse err := getJSON(ts.server.URL+`/api/traces/chumbawumba`, &response) @@ -393,8 +375,7 @@ func TestGetTraceBadTraceID(t *testing.T) { } func TestSearchSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("FindTraces", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("*spanstore.TraceQueryParameters")). Return([]*model.Trace{mockTrace}, nil).Once() @@ -405,8 +386,7 @@ func TestSearchSuccess(t *testing.T) { } func TestSearchByTraceIDSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Twice() @@ -419,10 +399,9 @@ func TestSearchByTraceIDSuccess(t *testing.T) { func TestSearchByTraceIDSuccessWithArchive(t *testing.T) { archiveReadMock := &spanstoremocks.Reader{} - ts := initializeTestServerWithOptions(&tenancy.Manager{}, querysvc.QueryServiceOptions{ + ts := initializeTestServerWithOptions(t, &tenancy.Manager{}, querysvc.QueryServiceOptions{ ArchiveSpanReader: archiveReadMock, }) - defer ts.server.Close() ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Twice() archiveReadMock.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). @@ -436,8 +415,7 @@ func TestSearchByTraceIDSuccessWithArchive(t *testing.T) { } func TestSearchByTraceIDNotFound(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, spanstore.ErrTraceNotFound).Once() @@ -449,8 +427,7 @@ func TestSearchByTraceIDNotFound(t *testing.T) { } func TestSearchByTraceIDFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) whatsamattayou := "https://youtu.be/WrKFOCg13QQ" ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(nil, fmt.Errorf(whatsamattayou)).Once() @@ -462,6 +439,7 @@ func TestSearchByTraceIDFailure(t *testing.T) { func TestSearchModelConversionFailure(t *testing.T) { ts := initializeTestServerWithOptions( + t, &tenancy.Manager{}, querysvc.QueryServiceOptions{ Adjuster: adjuster.Func(func(trace *model.Trace) (*model.Trace, error) { @@ -469,7 +447,6 @@ func TestSearchModelConversionFailure(t *testing.T) { }), }, ) - defer ts.server.Close() ts.spanReader.On("FindTraces", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("*spanstore.TraceQueryParameters")). Return([]*model.Trace{mockTrace}, nil).Once() var response structuredResponse @@ -480,8 +457,7 @@ func TestSearchModelConversionFailure(t *testing.T) { } func TestSearchDBFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("FindTraces", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("*spanstore.TraceQueryParameters")). Return(nil, fmt.Errorf("whatsamattayou")).Once() @@ -510,8 +486,7 @@ func TestSearchFailures(t *testing.T) { } func testIndividualSearchFailures(t *testing.T, urlStr, errMsg string) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("Query", mock.AnythingOfType("spanstore.TraceQueryParameters")). Return([]*model.Trace{}, nil).Once() @@ -521,8 +496,7 @@ func testIndividualSearchFailures(t *testing.T, urlStr, errMsg string) { } func TestGetServicesSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) expectedServices := []string{"trifle", "bling"} ts.spanReader.On("GetServices", mock.AnythingOfType("*context.valueCtx")).Return(expectedServices, nil).Once() @@ -537,8 +511,7 @@ func TestGetServicesSuccess(t *testing.T) { } func TestGetServicesStorageFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On("GetServices", mock.AnythingOfType("*context.valueCtx")).Return(nil, errStorage).Once() var response structuredResponse @@ -547,8 +520,7 @@ func TestGetServicesStorageFailure(t *testing.T) { } func TestGetOperationsSuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) expectedOperations := []spanstore.Operation{{Name: ""}, {Name: "get", SpanKind: "server"}} ts.spanReader.On( "GetOperations", @@ -577,17 +549,14 @@ func TestGetOperationsSuccess(t *testing.T) { } func TestGetOperationsNoServiceName(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() - + ts := initializeTestServer(t) var response structuredResponse err := getJSON(ts.server.URL+"/api/operations", &response) require.Error(t, err) } func TestGetOperationsStorageFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On( "GetOperations", mock.AnythingOfType("*context.valueCtx"), @@ -599,8 +568,7 @@ func TestGetOperationsStorageFailure(t *testing.T) { } func TestGetOperationsLegacySuccess(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) expectedOperationNames := []string{"", "get"} expectedOperations := []spanstore.Operation{ {Name: ""}, @@ -621,8 +589,7 @@ func TestGetOperationsLegacySuccess(t *testing.T) { } func TestGetOperationsLegacyStorageFailure(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) ts.spanReader.On( "GetOperations", mock.AnythingOfType("*context.valueCtx"), @@ -641,7 +608,7 @@ func TestTransformOTLPSuccess(t *testing.T) { require.NoError(t, err) return out } - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { inFile, err := os.Open("./fixture/otlp2jaeger-in.json") require.NoError(t, err) @@ -661,7 +628,7 @@ func TestTransformOTLPSuccess(t *testing.T) { } func TestTransformOTLPReadError(t *testing.T) { - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { bytesReader := &IoReaderMock{} bytesReader.On("Read", mock.AnythingOfType("[]uint8")).Return(0, errors.New("Mocked error")) _, err := ts.server.Client().Post(ts.server.URL+"/api/transform", "application/json", bytesReader) @@ -670,7 +637,7 @@ func TestTransformOTLPReadError(t *testing.T) { } func TestTransformOTLPBadPayload(t *testing.T) { - withTestServer(func(ts *testServer) { + withTestServer(t, func(ts *testServer) { response := new(any) request := "Bad Payload" err := postJSON(ts.server.URL+"/api/transform", request, response) @@ -683,8 +650,7 @@ func TestGetMetricsSuccess(t *testing.T) { apiHandlerOptions := []HandlerOption{ HandlerOptions.MetricsQueryService(mr), } - ts := initializeTestServer(apiHandlerOptions...) - defer ts.server.Close() + ts := initializeTestServer(t, apiHandlerOptions...) expectedLabel := &metrics.Label{ Name: "service_name", Value: "emailservice", @@ -766,11 +732,7 @@ func TestGetMetricsSuccess(t *testing.T) { func TestMetricsReaderError(t *testing.T) { metricsReader := &metricsmocks.Reader{} - apiHandlerOptions := []HandlerOption{ - HandlerOptions.MetricsQueryService(metricsReader), - } - ts := initializeTestServer(apiHandlerOptions...) - defer ts.server.Close() + ts := initializeTestServer(t, HandlerOptions.MetricsQueryService(metricsReader)) for _, tc := range []struct { name string @@ -818,10 +780,7 @@ func TestMetricsQueryDisabled(t *testing.T) { disabledReader, err := disabled.NewMetricsReader() require.NoError(t, err) - apiHandlerOptions := []HandlerOption{ - HandlerOptions.MetricsQueryService(disabledReader), - } - ts := initializeTestServer(apiHandlerOptions...) + ts := initializeTestServer(t, HandlerOptions.MetricsQueryService(disabledReader)) defer ts.server.Close() for _, tc := range []struct { @@ -854,10 +813,7 @@ func TestMetricsQueryDisabled(t *testing.T) { func TestGetMinStep(t *testing.T) { metricsReader := &metricsmocks.Reader{} - apiHandlerOptions := []HandlerOption{ - HandlerOptions.MetricsQueryService(metricsReader), - } - ts := initializeTestServer(apiHandlerOptions...) + ts := initializeTestServer(t, HandlerOptions.MetricsQueryService(metricsReader)) defer ts.server.Close() // Prepare metricsReader.On( @@ -946,10 +902,9 @@ func TestSearchTenancyHTTP(t *testing.T) { tenancyOptions := tenancy.Options{ Enabled: true, } - ts := initializeTestServerWithOptions( + ts := initializeTestServerWithOptions(t, tenancy.NewManager(&tenancyOptions), querysvc.QueryServiceOptions{}) - defer ts.server.Close() ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Twice() @@ -973,10 +928,7 @@ func TestSearchTenancyRejectionHTTP(t *testing.T) { tenancyOptions := tenancy.Options{ Enabled: true, } - ts := initializeTestServerWithOptions( - tenancy.NewManager(&tenancyOptions), - querysvc.QueryServiceOptions{}) - defer ts.server.Close() + ts := initializeTestServerWithOptions(t, tenancy.NewManager(&tenancyOptions), querysvc.QueryServiceOptions{}) ts.spanReader.On("GetTrace", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("model.TraceID")). Return(mockTrace, nil).Twice() @@ -1002,10 +954,7 @@ func TestSearchTenancyFlowTenantHTTP(t *testing.T) { tenancyOptions := tenancy.Options{ Enabled: true, } - ts := initializeTestServerWithOptions( - tenancy.NewManager(&tenancyOptions), - querysvc.QueryServiceOptions{}) - defer ts.server.Close() + ts := initializeTestServerWithOptions(t, tenancy.NewManager(&tenancyOptions), querysvc.QueryServiceOptions{}) ts.spanReader.On("GetTrace", mock.MatchedBy(func(v any) bool { ctx, ok := v.(context.Context) if !ok || tenancy.GetTenant(ctx) != "acme" { diff --git a/cmd/query/app/query_parser_test.go b/cmd/query/app/query_parser_test.go index e75d448a144..45fa6ea454c 100644 --- a/cmd/query/app/query_parser_test.go +++ b/cmd/query/app/query_parser_test.go @@ -256,8 +256,7 @@ func TestParseRepeatedSpanKinds(t *testing.T) { } func TestParameterErrors(t *testing.T) { - ts := initializeTestServer() - defer ts.server.Close() + ts := initializeTestServer(t) for _, tc := range []struct { name string diff --git a/cmd/query/app/server.go b/cmd/query/app/server.go index 6e5261beadc..f44d685c470 100644 --- a/cmd/query/app/server.go +++ b/cmd/query/app/server.go @@ -78,8 +78,9 @@ func NewServer(querySvc *querysvc.QueryService, if err != nil { return nil, fmt.Errorf("invalid gRPC server host:port: %w", err) } + separatePorts := grpcPort != httpPort || grpcPort == "0" || httpPort == "0" - if (options.TLSHTTP.Enabled || options.TLSGRPC.Enabled) && (grpcPort == httpPort) { + if (options.TLSHTTP.Enabled || options.TLSGRPC.Enabled) && !separatePorts { return nil, errors.New("server with TLS enabled can not use same host ports for gRPC and HTTP. Use dedicated HTTP and gRPC host ports instead") } @@ -98,7 +99,7 @@ func NewServer(querySvc *querysvc.QueryService, queryOptions: options, grpcServer: grpcServer, httpServer: httpServer, - separatePorts: grpcPort != httpPort, + separatePorts: separatePorts, Setting: telset, }, nil } @@ -232,8 +233,8 @@ func (s *Server) initListener() (cmux.CMux, error) { } s.Logger.Info( "Query server started", - zap.String("http_addr", s.httpConn.Addr().String()), - zap.String("grpc_addr", s.grpcConn.Addr().String()), + zap.String("http_addr", s.HTTPAddr()), + zap.String("grpc_addr", s.GRPCAddr()), ) return nil, nil } @@ -346,6 +347,14 @@ func (s *Server) Start() error { return nil } +func (s *Server) HTTPAddr() string { + return s.httpConn.Addr().String() +} + +func (s *Server) GRPCAddr() string { + return s.grpcConn.Addr().String() +} + // Close stops HTTP, GRPC servers and closes the port listener. func (s *Server) Close() error { errs := []error{ diff --git a/cmd/query/app/server_test.go b/cmd/query/app/server_test.go index e2d5c839365..cbfa7f3c4df 100644 --- a/cmd/query/app/server_test.go +++ b/cmd/query/app/server_test.go @@ -353,8 +353,8 @@ func TestServerHTTPTLS(t *testing.T) { } serverOptions := &QueryOptions{ - GRPCHostPort: ports.GetAddressFromCLIOptions(ports.QueryGRPC, ""), - HTTPHostPort: ports.GetAddressFromCLIOptions(ports.QueryHTTP, ""), + GRPCHostPort: ":0", + HTTPHostPort: ":0", TLSHTTP: test.TLS, TLSGRPC: tlsGrpc, QueryOptionsBase: QueryOptionsBase{ @@ -385,14 +385,14 @@ func TestServerHTTPTLS(t *testing.T) { require.NoError(t, err0) dialer := &net.Dialer{Timeout: 2 * time.Second} - conn, err1 := tls.DialWithDialer(dialer, "tcp", "localhost:"+fmt.Sprintf("%d", ports.QueryHTTP), clientTLSCfg) + conn, err1 := tls.DialWithDialer(dialer, "tcp", server.HTTPAddr(), clientTLSCfg) clientError = err1 clientClose = nil if conn != nil { clientClose = conn.Close } } else { - conn, err1 := net.DialTimeout("tcp", "localhost:"+fmt.Sprintf("%d", ports.QueryHTTP), 2*time.Second) + conn, err1 := net.DialTimeout("tcp", server.HTTPAddr(), 2*time.Second) clientError = err1 clientClose = nil if conn != nil { @@ -417,7 +417,7 @@ func TestServerHTTPTLS(t *testing.T) { } querySvc.spanReader.On("FindTraces", mock.Anything, mock.Anything).Return([]*model.Trace{mockTrace}, nil).Once() queryString := "/api/traces?service=service&start=0&end=0&operation=operation&limit=200&minDuration=20ms" - req, err := http.NewRequest(http.MethodGet, "https://localhost:"+fmt.Sprintf("%d", ports.QueryHTTP)+queryString, nil) + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("https://%s/%s", server.HTTPAddr(), queryString), nil) require.NoError(t, err) req.Header.Add("Accept", "application/json") @@ -490,8 +490,8 @@ func TestServerGRPCTLS(t *testing.T) { tlsHttp = enabledTLSCfg } serverOptions := &QueryOptions{ - GRPCHostPort: ports.GetAddressFromCLIOptions(ports.QueryGRPC, ""), - HTTPHostPort: ports.GetAddressFromCLIOptions(ports.QueryHTTP, ""), + GRPCHostPort: ":0", + HTTPHostPort: ":0", TLSHTTP: tlsHttp, TLSGRPC: test.TLS, QueryOptionsBase: QueryOptionsBase{ @@ -518,9 +518,9 @@ func TestServerGRPCTLS(t *testing.T) { require.NoError(t, err0) defer test.clientTLS.Close() creds := credentials.NewTLS(clientTLSCfg) - client = newGRPCClientWithTLS(t, ports.PortToHostPort(ports.QueryGRPC), creds) + client = newGRPCClientWithTLS(t, server.GRPCAddr(), creds) } else { - client = newGRPCClientWithTLS(t, ports.PortToHostPort(ports.QueryGRPC), nil) + client = newGRPCClientWithTLS(t, server.GRPCAddr(), nil) } t.Cleanup(func() { require.NoError(t, client.conn.Close()) @@ -699,13 +699,8 @@ func TestServerHandlesPortZero(t *testing.T) { message := logs.FilterMessage("Query server started") assert.Equal(t, 1, message.Len(), "Expected 'Query server started' log message.") - onlyEntry := message.All()[0] - port := onlyEntry.ContextMap()["port"].(int64) - assert.Greater(t, port, int64(0)) - grpctest.ReflectionServiceValidator{ - HostPort: fmt.Sprintf(":%v", port), - Server: server.grpcServer, + HostPort: server.GRPCAddr(), ExpectedServices: []string{ "jaeger.api_v2.QueryService", "jaeger.api_v3.QueryService", diff --git a/cmd/remote-storage/app/server_test.go b/cmd/remote-storage/app/server_test.go index 29324de7d05..e6234b8facb 100644 --- a/cmd/remote-storage/app/server_test.go +++ b/cmd/remote-storage/app/server_test.go @@ -77,7 +77,7 @@ func TestNewServer_CreateStorageErrors(t *testing.T) { require.NoError(t, err) err = s.Start() require.NoError(t, err) - validateGRPCServer(t, s.grpcConn.Addr().String(), s.grpcServer) + validateGRPCServer(t, s.grpcConn.Addr().String()) s.grpcConn.Close() // causes logged error } @@ -398,17 +398,16 @@ func TestServerHandlesPortZero(t *testing.T) { onlyEntry := message.All()[0] hostPort := onlyEntry.ContextMap()["addr"].(string) - validateGRPCServer(t, hostPort, server.grpcServer) + validateGRPCServer(t, hostPort) server.Close() assert.Equal(t, healthcheck.Unavailable, flagsSvc.HC().Get()) } -func validateGRPCServer(t *testing.T, hostPort string, server *grpc.Server) { +func validateGRPCServer(t *testing.T, hostPort string) { grpctest.ReflectionServiceValidator{ HostPort: hostPort, - Server: server, ExpectedServices: []string{ "jaeger.storage.v1.SpanReaderPlugin", "jaeger.storage.v1.SpanWriterPlugin", @@ -417,7 +416,7 @@ func validateGRPCServer(t *testing.T, hostPort string, server *grpc.Server) { "jaeger.storage.v1.ArchiveSpanReaderPlugin", "jaeger.storage.v1.ArchiveSpanWriterPlugin", "jaeger.storage.v1.StreamingSpanWriterPlugin", - // "grpc.health.v1.Health", + "grpc.health.v1.Health", }, }.Execute(t) } diff --git a/examples/hotrod/docker-compose.yml b/examples/hotrod/docker-compose.yml index 8a0e2a90368..250f78f82b8 100644 --- a/examples/hotrod/docker-compose.yml +++ b/examples/hotrod/docker-compose.yml @@ -12,10 +12,6 @@ services: - "4318:4318" environment: - LOG_LEVEL=debug - # Since v0.105 the OTEL Collector components default hostname to 'localhost'. - # However, that does not work inside a Docker container, so we listen on all IPs. - - COLLECTOR_OTLP_GRPC_HOST_PORT=0.0.0.0:4317 - - COLLECTOR_OTLP_HTTP_HOST_PORT=0.0.0.0:4318 networks: - jaeger-example hotrod: diff --git a/internal/grpctest/reflection.go b/internal/grpctest/reflection.go index 8aba438531d..c1e6e6a0c47 100644 --- a/internal/grpctest/reflection.go +++ b/internal/grpctest/reflection.go @@ -27,7 +27,6 @@ import ( // ReflectionServiceValidator verifies that a gRPC service at a given address // supports reflection service. Called must invoke Execute func. type ReflectionServiceValidator struct { - Server *grpc.Server HostPort string ExpectedServices []string } diff --git a/internal/grpctest/reflection_test.go b/internal/grpctest/reflection_test.go index a814e5418e7..af6ebe7290b 100644 --- a/internal/grpctest/reflection_test.go +++ b/internal/grpctest/reflection_test.go @@ -41,7 +41,6 @@ func TestReflectionServiceValidator(t *testing.T) { ReflectionServiceValidator{ HostPort: listener.Addr().String(), - Server: server, ExpectedServices: []string{"grpc.reflection.v1alpha.ServerReflection"}, }.Execute(t) } From e3e763c0474c9e724c15462eb80272be6a2e67ee Mon Sep 17 00:00:00 2001 From: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Date: Sat, 13 Jul 2024 21:39:54 +0530 Subject: [PATCH 35/52] Created telset for remote-storage component (#5731) **Which problem is this PR solving?** This PR addresses a part of the issue [#5633 ](https://github.com/jaegertracing/jaeger/issues/5633) **Description of the changes** This is a Draft PR to achieve Observability Parity between V1 and V2 components by creating an unified telemetery container to pass observability clients to V1 components. **How was this change tested?** The changes were tested by running the following command: ```bash make test ``` **Checklist** - [x] I have read [CONTRIBUTING_GUIDELINES.md](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md) - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - `for jaeger: make lint test` - `for jaeger-ui: yarn lint` and `yarn test` --------- Signed-off-by: Wise-Wizard Signed-off-by: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Co-authored-by: Yuri Shkuro --- cmd/remote-storage/app/server.go | 28 ++++++++-------- cmd/remote-storage/app/server_test.go | 32 +++++++++++++------ cmd/remote-storage/main.go | 7 +++- .../integration/remote_memory_storage.go | 7 +++- 4 files changed, 48 insertions(+), 26 deletions(-) diff --git a/cmd/remote-storage/app/server.go b/cmd/remote-storage/app/server.go index a79187ca471..58b72445720 100644 --- a/cmd/remote-storage/app/server.go +++ b/cmd/remote-storage/app/server.go @@ -19,6 +19,7 @@ import ( "net" "sync" + "go.opentelemetry.io/collector/component" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -26,7 +27,7 @@ import ( "google.golang.org/grpc/reflection" "github.com/jaegertracing/jaeger/cmd/query/app/querysvc" - "github.com/jaegertracing/jaeger/pkg/healthcheck" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/storage" @@ -36,32 +37,30 @@ import ( // Server runs a gRPC server type Server struct { - logger *zap.Logger - healthcheck *healthcheck.HealthCheck - opts *Options + opts *Options grpcConn net.Listener grpcServer *grpc.Server wg sync.WaitGroup + telemetery.Setting } // NewServer creates and initializes Server. -func NewServer(options *Options, storageFactory storage.Factory, tm *tenancy.Manager, logger *zap.Logger, healthcheck *healthcheck.HealthCheck) (*Server, error) { - handler, err := createGRPCHandler(storageFactory, logger) +func NewServer(options *Options, storageFactory storage.Factory, tm *tenancy.Manager, telset telemetery.Setting) (*Server, error) { + handler, err := createGRPCHandler(storageFactory, telset.Logger) if err != nil { return nil, err } - grpcServer, err := createGRPCServer(options, tm, handler, logger) + grpcServer, err := createGRPCServer(options, tm, handler, telset.Logger) if err != nil { return nil, err } return &Server{ - logger: logger, - healthcheck: healthcheck, - opts: options, - grpcServer: grpcServer, + opts: options, + grpcServer: grpcServer, + Setting: telset, }, nil } @@ -129,15 +128,15 @@ func (s *Server) Start() error { if err != nil { return err } - s.logger.Info("Starting GRPC server", zap.Stringer("addr", listener.Addr())) + s.Logger.Info("Starting GRPC server", zap.Stringer("addr", listener.Addr())) s.grpcConn = listener s.wg.Add(1) go func() { defer s.wg.Done() if err := s.grpcServer.Serve(s.grpcConn); err != nil { - s.logger.Error("GRPC server exited", zap.Error(err)) + s.Logger.Error("GRPC server exited", zap.Error(err)) + s.ReportStatus(component.NewFatalErrorEvent(err)) } - s.healthcheck.Set(healthcheck.Unavailable) }() return nil @@ -149,5 +148,6 @@ func (s *Server) Close() error { s.grpcConn.Close() s.opts.TLSGRPC.Close() s.wg.Wait() + s.ReportStatus(component.NewStatusEvent(component.StatusStopped)) return nil } diff --git a/cmd/remote-storage/app/server_test.go b/cmd/remote-storage/app/server_test.go index e6234b8facb..debad3dff51 100644 --- a/cmd/remote-storage/app/server_test.go +++ b/cmd/remote-storage/app/server_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.uber.org/zap" "go.uber.org/zap/zaptest/observer" "google.golang.org/grpc" @@ -33,6 +34,7 @@ import ( "github.com/jaegertracing/jaeger/internal/grpctest" "github.com/jaegertracing/jaeger/pkg/config/tlscfg" "github.com/jaegertracing/jaeger/pkg/healthcheck" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/ports" "github.com/jaegertracing/jaeger/proto-gen/storage_v1" @@ -51,14 +53,16 @@ func TestNewServer_CreateStorageErrors(t *testing.T) { factory.On("CreateSpanWriter").Return(nil, nil) factory.On("CreateDependencyReader").Return(nil, errors.New("no deps")).Once() factory.On("CreateDependencyReader").Return(nil, nil) - + telset := telemetery.Setting{ + Logger: zap.NewNop(), + ReportStatus: func(*component.StatusEvent) {}, + } f := func() (*Server, error) { return NewServer( &Options{GRPCHostPort: ":0"}, factory, tenancy.NewManager(&tenancy.Options{}), - zap.NewNop(), - healthcheck.New(), + telset, ) } _, err := f() @@ -123,13 +127,16 @@ func TestNewServer_TLSConfigError(t *testing.T) { KeyPath: "invalid/path", ClientCAPath: "invalid/path", } + telset := telemetery.Setting{ + Logger: zap.NewNop(), + ReportStatus: telemetery.HCAdapter(healthcheck.New()), + } storageMocks := newStorageMocks() _, err := NewServer( &Options{GRPCHostPort: ":8081", TLSGRPC: tlsCfg}, storageMocks.factory, tenancy.NewManager(&tenancy.Options{}), - zap.NewNop(), - healthcheck.New(), + telset, ) require.Error(t, err) assert.Contains(t, err.Error(), "invalid TLS config") @@ -334,12 +341,15 @@ func TestServerGRPCTLS(t *testing.T) { storageMocks.reader.On("GetServices", mock.AnythingOfType("*context.valueCtx")).Return(expectedServices, nil) tm := tenancy.NewManager(&tenancy.Options{Enabled: true}) + telset := telemetery.Setting{ + Logger: flagsSvc.Logger, + ReportStatus: telemetery.HCAdapter(flagsSvc.HC()), + } server, err := NewServer( serverOptions, storageMocks.factory, tm, - flagsSvc.Logger, - flagsSvc.HC(), + telset, ) require.NoError(t, err) require.NoError(t, server.Start()) @@ -380,13 +390,15 @@ func TestServerHandlesPortZero(t *testing.T) { zapCore, logs := observer.New(zap.InfoLevel) flagsSvc.Logger = zap.New(zapCore) storageMocks := newStorageMocks() - + telset := telemetery.Setting{ + Logger: flagsSvc.Logger, + ReportStatus: telemetery.HCAdapter(flagsSvc.HC()), + } server, err := NewServer( &Options{GRPCHostPort: ":0"}, storageMocks.factory, tenancy.NewManager(&tenancy.Options{}), - flagsSvc.Logger, - flagsSvc.HC(), + telset, ) require.NoError(t, err) diff --git a/cmd/remote-storage/main.go b/cmd/remote-storage/main.go index f194b491e6e..a810deab86e 100644 --- a/cmd/remote-storage/main.go +++ b/cmd/remote-storage/main.go @@ -32,6 +32,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/remote-storage/app" "github.com/jaegertracing/jaeger/pkg/config" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/pkg/version" "github.com/jaegertracing/jaeger/plugin/storage" @@ -77,7 +78,11 @@ func main() { } tm := tenancy.NewManager(&opts.Tenancy) - server, err := app.NewServer(opts, storageFactory, tm, svc.Logger, svc.HC()) + telset := telemetery.Setting{ + Logger: svc.Logger, + ReportStatus: telemetery.HCAdapter(svc.HC()), + } + server, err := app.NewServer(opts, storageFactory, tm, telset) if err != nil { logger.Fatal("Failed to create server", zap.Error(err)) } diff --git a/plugin/storage/integration/remote_memory_storage.go b/plugin/storage/integration/remote_memory_storage.go index 1bd2dd7b3e5..7ac8d90551f 100644 --- a/plugin/storage/integration/remote_memory_storage.go +++ b/plugin/storage/integration/remote_memory_storage.go @@ -20,6 +20,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/config" "github.com/jaegertracing/jaeger/pkg/healthcheck" "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/pkg/telemetery" "github.com/jaegertracing/jaeger/pkg/tenancy" "github.com/jaegertracing/jaeger/plugin/storage" "github.com/jaegertracing/jaeger/ports" @@ -47,7 +48,11 @@ func StartNewRemoteMemoryStorage(t *testing.T) *RemoteMemoryStorage { require.NoError(t, storageFactory.Initialize(metrics.NullFactory, logger)) t.Logf("Starting in-process remote storage server on %s", opts.GRPCHostPort) - server, err := app.NewServer(opts, storageFactory, tm, logger, healthcheck.New()) + telset := telemetery.Setting{ + Logger: logger, + ReportStatus: telemetery.HCAdapter(healthcheck.New()), + } + server, err := app.NewServer(opts, storageFactory, tm, telset) require.NoError(t, err) require.NoError(t, server.Start()) From 023d46e03acd3c6cc4e42a8dba1ef8134e440487 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 14 Jul 2024 00:32:34 -0300 Subject: [PATCH 36/52] Completely remove "grpc-plugin" as storage type (#5741) ## Which problem is this PR solving? - Last part of #4647 - In accordance with our deprecation policy, this CLI value can be removed in v1.60 (next release) ## Description of the changes - No longer accept `grpc-plugin` as a storage type. The valid value is `grpc`. Signed-off-by: Yuri Shkuro --- plugin/storage/factory.go | 1 - plugin/storage/factory_config.go | 7 ------- 2 files changed, 8 deletions(-) diff --git a/plugin/storage/factory.go b/plugin/storage/factory.go index 4e6de6d29be..433111e349b 100644 --- a/plugin/storage/factory.go +++ b/plugin/storage/factory.go @@ -46,7 +46,6 @@ const ( memoryStorageType = "memory" kafkaStorageType = "kafka" grpcStorageType = "grpc" - grpcPluginDeprecated = "grpc-plugin" badgerStorageType = "badger" blackholeStorageType = "blackhole" diff --git a/plugin/storage/factory_config.go b/plugin/storage/factory_config.go index 1d8a0748d8f..f58af121ca4 100644 --- a/plugin/storage/factory_config.go +++ b/plugin/storage/factory_config.go @@ -66,13 +66,6 @@ func FactoryConfigFromEnvAndCLI(args []string, log io.Writer) FactoryConfig { if spanStorageType == "" { spanStorageType = cassandraStorageType } - if spanStorageType == grpcPluginDeprecated { - fmt.Fprintf(log, - "WARNING: `%s` storage type is deprecated and will be remove from v1.60. Use `%s`.\n\n", - grpcPluginDeprecated, grpcStorageType, - ) - spanStorageType = grpcStorageType - } spanWriterTypes := strings.Split(spanStorageType, ",") if len(spanWriterTypes) > 1 { fmt.Fprintf(log, From 882ae45882e89f6f2cfdf204b541bd77b80e58ce Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 14 Jul 2024 02:25:16 -0300 Subject: [PATCH 37/52] Remove not needed GetAddressFromCLIOptions (#5742) ## Which problem is this PR solving? - Remove function that is no longer needed Signed-off-by: Yuri Shkuro --- cmd/query/app/server_test.go | 2 +- ports/ports.go | 9 --------- ports/ports_test.go | 21 --------------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/cmd/query/app/server_test.go b/cmd/query/app/server_test.go index cbfa7f3c4df..42504e37906 100644 --- a/cmd/query/app/server_test.go +++ b/cmd/query/app/server_test.go @@ -611,7 +611,7 @@ func TestServerInUseHostPort(t *testing.T) { func TestServerSinglePort(t *testing.T) { flagsSvc := flags.NewService(ports.QueryAdminHTTP) flagsSvc.Logger = zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())) - hostPort := ports.GetAddressFromCLIOptions(ports.QueryHTTP, "") + hostPort := ports.PortToHostPort(ports.QueryHTTP) querySvc := makeQuerySvc() telset := initTelSet(flagsSvc.Logger, jtracer.NoOp(), flagsSvc.HC()) server, err := NewServer(querySvc.qs, nil, diff --git a/ports/ports.go b/ports/ports.go index caf035fc761..7e1fed56125 100644 --- a/ports/ports.go +++ b/ports/ports.go @@ -61,15 +61,6 @@ func PortToHostPort(port int) string { return ":" + strconv.Itoa(port) } -// GetAddressFromCLIOptions gets listening address based on port (deprecated flags) or host:port (new flags) -func GetAddressFromCLIOptions(port int, hostPort string) string { - if port != 0 { - return PortToHostPort(port) - } - - return FormatHostPort(hostPort) -} - // FormatHostPort returns hostPort in a usable format (host:port) if it wasn't already func FormatHostPort(hostPort string) string { if hostPort == "" { diff --git a/ports/ports_test.go b/ports/ports_test.go index a6dae7a4f18..6aed1f872d2 100644 --- a/ports/ports_test.go +++ b/ports/ports_test.go @@ -15,7 +15,6 @@ package ports import ( - "fmt" "testing" "github.com/stretchr/testify/assert" @@ -27,26 +26,6 @@ func TestPortToHostPort(t *testing.T) { assert.Equal(t, ":42", PortToHostPort(42)) } -func TestGetAddressFromCLIOptionsLegacy(t *testing.T) { - tests := []struct { - port int - hostPort string - out string - }{ - {port: 123, hostPort: "", out: ":123"}, - {port: 0, hostPort: "127.0.0.1:123", out: "127.0.0.1:123"}, - {port: 0, hostPort: ":123", out: ":123"}, - {port: 123, hostPort: "567", out: ":123"}, - {port: 0, hostPort: "123", out: ":123"}, - {port: 0, hostPort: "", out: ""}, - } - for _, test := range tests { - t.Run(fmt.Sprintf("%+v", test), func(t *testing.T) { - assert.Equal(t, test.out, GetAddressFromCLIOptions(test.port, test.hostPort)) - }) - } -} - func TestFormatHostPort(t *testing.T) { assert.Equal(t, ":42", FormatHostPort("42")) assert.Equal(t, ":831", FormatHostPort(":831")) From 0616fba550a3d2a09b2e8962b46bfcb59d3bc42c Mon Sep 17 00:00:00 2001 From: Pushkar Mishra Date: Mon, 15 Jul 2024 02:15:38 +0530 Subject: [PATCH 38/52] [jaeger-v2] Add `remotesampling` extension (#5389) ## Description of the changes - Part of #5531 - adds static sampling support for otel-based jaeger-v2. - supports hot reload - added unit tests ## How was this change tested? - `go run -tags=ui ./cmd/jaeger --config ./cmd/jaeger/config-badger.yaml` - `make test` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: pushkarm029 Signed-off-by: Yuri Shkuro Signed-off-by: Pushkar Mishra Co-authored-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- cmd/jaeger/config.yaml | 17 +- cmd/jaeger/internal/components.go | 6 +- .../extension/jaegerstorage/extension.go | 2 +- .../extension/jaegerstorage/extension_test.go | 2 +- .../extension/remotesampling/config.go | 91 ++++++ .../extension/remotesampling/config_test.go | 134 ++++++++ .../extension/remotesampling/extension.go | 296 ++++++++++++++++++ .../remotesampling/extension_test.go | 252 +++++++++++++++ .../extension/remotesampling/factory.go | 57 ++++ .../extension/remotesampling/factory_test.go | 28 ++ .../extension/remotesampling/package_test.go | 14 + .../processors/adaptivesampling/config.go | 18 ++ .../processors/adaptivesampling/factory.go | 48 +++ .../adaptivesampling/factory_test.go | 39 +++ .../adaptivesampling/package_test.go | 14 + .../processors/adaptivesampling/processor.go | 82 +++++ .../adaptivesampling/processor_test.go | 171 ++++++++++ cmd/jaeger/sampling-strategies.json | 18 ++ go.mod | 7 +- pkg/clientcfg/clientcfghttp/handler.go | 11 + pkg/clientcfg/clientcfghttp/handler_test.go | 151 ++++++--- .../strategyprovider/adaptive/aggregator.go | 17 + .../adaptive/aggregator_test.go | 41 +++ .../strategyprovider/adaptive/options.go | 38 ++- .../strategyprovider/adaptive/options_test.go | 15 + 25 files changed, 1506 insertions(+), 63 deletions(-) create mode 100644 cmd/jaeger/internal/extension/remotesampling/config.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/config_test.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/extension.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/extension_test.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/factory.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/factory_test.go create mode 100644 cmd/jaeger/internal/extension/remotesampling/package_test.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/config.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/factory.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/factory_test.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/package_test.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/processor.go create mode 100644 cmd/jaeger/internal/processors/adaptivesampling/processor_test.go create mode 100644 cmd/jaeger/sampling-strategies.json diff --git a/cmd/jaeger/config.yaml b/cmd/jaeger/config.yaml index 3be3a37af5d..e34fb2ff7d6 100644 --- a/cmd/jaeger/config.yaml +++ b/cmd/jaeger/config.yaml @@ -1,9 +1,9 @@ service: - extensions: [jaeger_storage, jaeger_query] + extensions: [jaeger_storage, jaeger_query, remote_sampling] pipelines: traces: receivers: [otlp, jaeger, zipkin] - processors: [batch] + processors: [batch, adaptive_sampling] exporters: [jaeger_storage_exporter] extensions: @@ -25,6 +25,16 @@ extensions: memstore_archive: max_traces: 100000 + remote_sampling: + # You can either use file or adaptive sampling strategy in remote_sampling + # file: + # path: ./cmd/jaeger/sampling-strategies.json + adaptive: + sampling_store: memstore + initial_sampling_probability: 0.1 + http: + grpc: + receivers: otlp: protocols: @@ -42,6 +52,9 @@ receivers: processors: batch: + # Adaptive Sampling Processor is required to support adaptive sampling. + # It expects remote_sampling extension with `adaptive:` config to be enabled. + adaptive_sampling: exporters: jaeger_storage_exporter: diff --git a/cmd/jaeger/internal/components.go b/cmd/jaeger/internal/components.go index c7b9957dbd8..f7161ffef22 100644 --- a/cmd/jaeger/internal/components.go +++ b/cmd/jaeger/internal/components.go @@ -29,7 +29,9 @@ import ( "github.com/jaegertracing/jaeger/cmd/jaeger/internal/exporters/storageexporter" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerquery" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/remotesampling" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/integration/storagecleaner" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/processors/adaptivesampling" ) type builders struct { @@ -62,7 +64,7 @@ func (b builders) build() (otelcol.Factories, error) { jaegerquery.NewFactory(), jaegerstorage.NewFactory(), storagecleaner.NewFactory(), - // TODO add adaptive sampling + remotesampling.NewFactory(), ) if err != nil { return otelcol.Factories{}, err @@ -99,7 +101,7 @@ func (b builders) build() (otelcol.Factories, error) { batchprocessor.NewFactory(), memorylimiterprocessor.NewFactory(), // add-ons - // TODO add adaptive sampling + adaptivesampling.NewFactory(), ) if err != nil { return otelcol.Factories{}, err diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension.go b/cmd/jaeger/internal/extension/jaegerstorage/extension.go index 9ca2dba178d..4f2e618d327 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension.go @@ -54,7 +54,7 @@ func GetStorageFactory(name string, host component.Host) (storage.Factory, error f, ok := comp.(Extension).Factory(name) if !ok { return nil, fmt.Errorf( - "cannot find storage '%s' declared by '%s' extension", + "cannot find definition of storage '%s' in the configuration for extension '%s'", name, componentType, ) } diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go index 4d42ff4289f..5a9bd7c4a9a 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go @@ -83,7 +83,7 @@ func TestStorageFactoryBadHostError(t *testing.T) { func TestStorageFactoryBadNameError(t *testing.T) { host := storageHost{t: t, ext: startStorageExtension(t, "foo")} _, err := GetStorageFactory("bar", host) - require.ErrorContains(t, err, "cannot find storage 'bar'") + require.ErrorContains(t, err, "cannot find definition of storage 'bar'") } func TestStorageFactoryBadShutdownError(t *testing.T) { diff --git a/cmd/jaeger/internal/extension/remotesampling/config.go b/cmd/jaeger/internal/extension/remotesampling/config.go new file mode 100644 index 00000000000..edff4707e26 --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/config.go @@ -0,0 +1,91 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "errors" + + "github.com/asaskevich/govalidator" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/confmap" + + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" +) + +var ( + errNoProvider = errors.New("no sampling strategy provider specified, expecting 'adaptive' or 'file'") + errMultipleProviders = errors.New("only one sampling strategy provider can be specified, 'adaptive' or 'file'") +) + +var ( + _ component.Config = (*Config)(nil) + _ component.ConfigValidator = (*Config)(nil) + _ confmap.Unmarshaler = (*Config)(nil) +) + +type Config struct { + File *FileConfig `mapstructure:"file"` + Adaptive *AdaptiveConfig `mapstructure:"adaptive"` + HTTP *confighttp.ServerConfig `mapstructure:"http"` + GRPC *configgrpc.ServerConfig `mapstructure:"grpc"` +} + +type FileConfig struct { + // File specifies a local file as the source of sampling strategies. + Path string `valid:"required" mapstructure:"path"` +} + +type AdaptiveConfig struct { + // SamplingStore is the name of the storage defined in the jaegerstorage extension. + SamplingStore string `valid:"required" mapstructure:"sampling_store"` + + adaptive.Options `mapstructure:",squash"` +} + +// Unmarshal is a custom unmarshaler that allows the factory to provide default values +// for nested configs (like GRPC endpoint) yes still reset the pointers to nil if the +// config did not contain the corresponding sections. +// This is a workaround for the lack of opional fields support in OTEL confmap. +// Issue: https://github.com/open-telemetry/opentelemetry-collector/issues/10266 +func (cfg *Config) Unmarshal(conf *confmap.Conf) error { + // first load the config normally + err := conf.Unmarshal(cfg) + if err != nil { + return err + } + + // use string names of fields to see if they are set in the confmap + if !conf.IsSet("file") { + cfg.File = nil + } + + if !conf.IsSet("adaptive") { + cfg.Adaptive = nil + } + + if !conf.IsSet("grpc") { + cfg.GRPC = nil + } + + if !conf.IsSet("http") { + cfg.HTTP = nil + } + + return nil +} + +func (cfg *Config) Validate() error { + if cfg.File == nil && cfg.Adaptive == nil { + return errNoProvider + } + + if cfg.File != nil && cfg.Adaptive != nil { + return errMultipleProviders + } + + _, err := govalidator.ValidateStruct(cfg) + return err +} diff --git a/cmd/jaeger/internal/extension/remotesampling/config_test.go b/cmd/jaeger/internal/extension/remotesampling/config_test.go new file mode 100644 index 00000000000..c5071423c19 --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/config_test.go @@ -0,0 +1,134 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" +) + +func Test_Validate(t *testing.T) { + tests := []struct { + name string + config *Config + expectedErr string + }{ + { + name: "No provider specified", + config: &Config{}, + expectedErr: "no sampling strategy provider specified, expecting 'adaptive' or 'file'", + }, + { + name: "Both providers specified", + config: &Config{ + File: &FileConfig{Path: "test-path"}, + Adaptive: &AdaptiveConfig{SamplingStore: "test-store"}, + }, + expectedErr: "only one sampling strategy provider can be specified, 'adaptive' or 'file'", + }, + { + name: "Only File provider specified", + config: &Config{ + File: &FileConfig{Path: "test-path"}, + }, + expectedErr: "", + }, + { + name: "Only Adaptive provider specified", + config: &Config{ + Adaptive: &AdaptiveConfig{SamplingStore: "test-store"}, + }, + expectedErr: "", + }, + { + name: "Invalid File provider", + config: &Config{ + File: &FileConfig{Path: ""}, + }, + expectedErr: "File.Path: non zero value required", + }, + { + name: "Invalid Adaptive provider", + config: &Config{ + Adaptive: &AdaptiveConfig{SamplingStore: ""}, + }, + expectedErr: "Adaptive.SamplingStore: non zero value required", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.config.Validate() + if tt.expectedErr == "" { + require.NoError(t, err) + } else { + assert.Equal(t, tt.expectedErr, err.Error()) + } + }) + } +} + +func Test_Unmarshal(t *testing.T) { + tests := []struct { + name string + input map[string]any + expectedCfg *Config + expectedErr string + }{ + { + name: "Valid config with File", + input: map[string]any{ + "file": map[string]any{ + "path": "test-path", + }, + }, + expectedCfg: &Config{ + File: &FileConfig{Path: "test-path"}, + }, + expectedErr: "", + }, + { + name: "Valid config with Adaptive", + input: map[string]any{ + "adaptive": map[string]any{ + "sampling_store": "test-store", + }, + }, + expectedCfg: &Config{ + Adaptive: &AdaptiveConfig{SamplingStore: "test-store"}, + }, + expectedErr: "", + }, + { + name: "Empty config", + input: map[string]any{}, + expectedCfg: &Config{}, + expectedErr: "", + }, + { + name: "Invalid config", + input: map[string]any{ + "foo": "bar", + }, + expectedErr: "invalid keys: foo", // sensitive to lib implementation + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + conf := confmap.NewFromStringMap(tt.input) + var cfg Config + err := cfg.Unmarshal(conf) + if tt.expectedErr == "" { + require.NoError(t, err) + assert.Equal(t, tt.expectedCfg, &cfg) + } else { + assert.ErrorContains(t, err, tt.expectedErr) + } + }) + } +} diff --git a/cmd/jaeger/internal/extension/remotesampling/extension.go b/cmd/jaeger/internal/extension/remotesampling/extension.go new file mode 100644 index 00000000000..58552d0eaab --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/extension.go @@ -0,0 +1,296 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "context" + "errors" + "fmt" + "net" + "net/http" + "sync" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.uber.org/zap" + "google.golang.org/grpc" + "google.golang.org/grpc/health" + "google.golang.org/grpc/health/grpc_health_v1" + + "github.com/jaegertracing/jaeger/cmd/collector/app/sampling" + "github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp" + "github.com/jaegertracing/jaeger/pkg/metrics" + "github.com/jaegertracing/jaeger/plugin/sampling/leaderelection" + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/static" + "github.com/jaegertracing/jaeger/proto-gen/api_v2" + "github.com/jaegertracing/jaeger/storage" + "github.com/jaegertracing/jaeger/storage/samplingstore" +) + +var _ extension.Extension = (*rsExtension)(nil) + +// type Extension interface { +// extension.Extension +// // rs *rsExtension +// } + +const defaultResourceName = "sampling_store_leader" + +type rsExtension struct { + cfg *Config + telemetry component.TelemetrySettings + httpServer *http.Server + grpcServer *grpc.Server + strategyProvider samplingstrategy.Provider // TODO we should rename this to Provider, not "store" + adaptiveStore samplingstore.Store + distLock *leaderelection.DistributedElectionParticipant + shutdownWG sync.WaitGroup +} + +func newExtension(cfg *Config, telemetry component.TelemetrySettings) *rsExtension { + return &rsExtension{ + cfg: cfg, + telemetry: telemetry, + } +} + +// AdaptiveSamplingComponents is a struct that holds the components needed for adaptive sampling. +type AdaptiveSamplingComponents struct { + SamplingStore samplingstore.Store + DistLock *leaderelection.DistributedElectionParticipant + Options *adaptive.Options +} + +// GetAdaptiveSamplingComponents locates the `remotesampling` extension in Host +// and returns the sampling store and a loader/follower implementation, provided +// that the extension is configured with adaptive sampling (vs. file-based config). +func GetAdaptiveSamplingComponents(host component.Host) (*AdaptiveSamplingComponents, error) { + var comp component.Component + var compID component.ID + for id, ext := range host.GetExtensions() { + if id.Type() == ComponentType { + comp = ext + compID = id + break + } + } + if comp == nil { + return nil, fmt.Errorf( + "cannot find extension '%s' (make sure it's defined earlier in the config)", + ComponentType, + ) + } + ext, ok := comp.(*rsExtension) + if !ok { + return nil, fmt.Errorf("extension '%s' is not of type '%s'", compID, ComponentType) + } + if ext.adaptiveStore == nil || ext.distLock == nil { + return nil, fmt.Errorf("extension '%s' is not configured for adaptive sampling", compID) + } + return &AdaptiveSamplingComponents{ + SamplingStore: ext.adaptiveStore, + DistLock: ext.distLock, + Options: &ext.cfg.Adaptive.Options, + }, nil +} + +func (ext *rsExtension) Start(ctx context.Context, host component.Host) error { + if ext.cfg.File != nil { + ext.telemetry.Logger.Info( + "Starting file-based sampling strategy provider", + zap.String("path", ext.cfg.File.Path), + ) + if err := ext.startFileBasedStrategyProvider(ctx); err != nil { + return err + } + } + + if ext.cfg.Adaptive != nil { + ext.telemetry.Logger.Info( + "Starting adaptive sampling strategy provider", + zap.String("sampling_store", ext.cfg.Adaptive.SamplingStore), + ) + if err := ext.startAdaptiveStrategyProvider(host); err != nil { + return err + } + } + + if ext.cfg.HTTP != nil { + if err := ext.startHTTPServer(ctx, host); err != nil { + return fmt.Errorf("failed to start sampling http server: %w", err) + } + } + + if ext.cfg.GRPC != nil { + if err := ext.startGRPCServer(ctx, host); err != nil { + return fmt.Errorf("failed to start sampling gRPC server: %w", err) + } + } + + return nil +} + +func (ext *rsExtension) Shutdown(ctx context.Context) error { + var errs []error + + if ext.httpServer != nil { + if err := ext.httpServer.Shutdown(ctx); err != nil { + errs = append(errs, fmt.Errorf("failed to stop the sampling HTTP server: %w", err)) + } + } + + if ext.grpcServer != nil { + ext.grpcServer.GracefulStop() + } + + if ext.distLock != nil { + if err := ext.distLock.Close(); err != nil { + errs = append(errs, fmt.Errorf("failed to stop the distributed lock: %w", err)) + } + } + + if ext.strategyProvider != nil { + if err := ext.strategyProvider.Close(); err != nil { + errs = append(errs, fmt.Errorf("failed to stop strategy provider: %w", err)) + } + } + return errors.Join(errs...) +} + +func (ext *rsExtension) startFileBasedStrategyProvider(_ context.Context) error { + opts := static.Options{ + StrategiesFile: ext.cfg.File.Path, + } + + // contextcheck linter complains about next line that context is not passed. + //nolint + provider, err := static.NewProvider(opts, ext.telemetry.Logger) + if err != nil { + return fmt.Errorf("failed to create the local file strategy store: %w", err) + } + + ext.strategyProvider = provider + return nil +} + +func (ext *rsExtension) startAdaptiveStrategyProvider(host component.Host) error { + storageName := ext.cfg.Adaptive.SamplingStore + f, err := jaegerstorage.GetStorageFactory(storageName, host) + if err != nil { + return fmt.Errorf("cannot find storage factory: %w", err) + } + + storeFactory, ok := f.(storage.SamplingStoreFactory) + if !ok { + return fmt.Errorf("storage '%s' does not support sampling store", storageName) + } + + store, err := storeFactory.CreateSamplingStore(ext.cfg.Adaptive.AggregationBuckets) + if err != nil { + return fmt.Errorf("failed to create the sampling store: %w", err) + } + ext.adaptiveStore = store + + { + lock, err := storeFactory.CreateLock() + if err != nil { + return fmt.Errorf("failed to create the distributed lock: %w", err) + } + + ep := leaderelection.NewElectionParticipant(lock, defaultResourceName, + leaderelection.ElectionParticipantOptions{ + LeaderLeaseRefreshInterval: ext.cfg.Adaptive.LeaderLeaseRefreshInterval, + FollowerLeaseRefreshInterval: ext.cfg.Adaptive.FollowerLeaseRefreshInterval, + Logger: ext.telemetry.Logger, + }) + if err := ep.Start(); err != nil { + return fmt.Errorf("failed to start the leader election participant: %w", err) + } + ext.distLock = ep + } + + provider := adaptive.NewProvider(ext.cfg.Adaptive.Options, ext.telemetry.Logger, ext.distLock, store) + if err := provider.Start(); err != nil { + return fmt.Errorf("failed to start the adaptive strategy store: %w", err) + } + ext.strategyProvider = provider + return nil +} + +func (ext *rsExtension) startHTTPServer(ctx context.Context, host component.Host) error { + handler := clientcfghttp.NewHTTPHandler(clientcfghttp.HTTPHandlerParams{ + ConfigManager: &clientcfghttp.ConfigManager{ + SamplingProvider: ext.strategyProvider, + }, + MetricsFactory: metrics.NullFactory, + BasePath: "/api", // TODO is /api correct? + }) + httpMux := http.NewServeMux() + handler.RegisterRoutesWithHTTP(httpMux) + + var err error + if ext.httpServer, err = ext.cfg.HTTP.ToServer(ctx, host, ext.telemetry, httpMux); err != nil { + return err + } + + ext.telemetry.Logger.Info( + "Starting remote sampling HTTP server", + zap.String("endpoint", ext.cfg.HTTP.Endpoint), + ) + var hln net.Listener + if hln, err = ext.cfg.HTTP.ToListener(ctx); err != nil { + return err + } + + ext.shutdownWG.Add(1) + go func() { + defer ext.shutdownWG.Done() + + err := ext.httpServer.Serve(hln) + if err != nil && !errors.Is(err, http.ErrServerClosed) { + ext.telemetry.ReportStatus(component.NewFatalErrorEvent(err)) + } + }() + + return nil +} + +func (ext *rsExtension) startGRPCServer(ctx context.Context, host component.Host) error { + var err error + if ext.grpcServer, err = ext.cfg.GRPC.ToServer(ctx, host, ext.telemetry); err != nil { + return err + } + + api_v2.RegisterSamplingManagerServer(ext.grpcServer, sampling.NewGRPCHandler(ext.strategyProvider)) + + healthServer := health.NewServer() // support health checks on the gRPC server + healthServer.SetServingStatus("jaeger.api_v2.SamplingManager", grpc_health_v1.HealthCheckResponse_SERVING) + grpc_health_v1.RegisterHealthServer(ext.grpcServer, healthServer) + + ext.telemetry.Logger.Info( + "Starting remote sampling GRPC server", + zap.String("endpoint", ext.cfg.GRPC.NetAddr.Endpoint), + ) + var gln net.Listener + if gln, err = ext.cfg.GRPC.NetAddr.Listen(ctx); err != nil { + return err + } + + ext.shutdownWG.Add(1) + go func() { + defer ext.shutdownWG.Done() + if err := ext.grpcServer.Serve(gln); err != nil && !errors.Is(err, grpc.ErrServerStopped) { + ext.telemetry.ReportStatus(component.NewFatalErrorEvent(err)) + } + }() + + return nil +} + +func (*rsExtension) Dependencies() []component.ID { + return []component.ID{jaegerstorage.ID} +} diff --git a/cmd/jaeger/internal/extension/remotesampling/extension_test.go b/cmd/jaeger/internal/extension/remotesampling/extension_test.go new file mode 100644 index 00000000000..de8cb300e24 --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/extension_test.go @@ -0,0 +1,252 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "context" + "io" + "net/http" + "path/filepath" + "testing" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/extension" + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" + "github.com/jaegertracing/jaeger/plugin/storage/memory" + "github.com/jaegertracing/jaeger/proto-gen/api_v2" +) + +func makeStorageExtension(t *testing.T, memstoreName string) component.Host { + telemetrySettings := component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), + } + extensionFactory := jaegerstorage.NewFactory() + storageExtension, err := extensionFactory.CreateExtension( + context.Background(), + extension.Settings{ + TelemetrySettings: telemetrySettings, + }, + &jaegerstorage.Config{Backends: map[string]jaegerstorage.Backend{ + memstoreName: {Memory: &memory.Configuration{MaxTraces: 10000}}, + }}, + ) + require.NoError(t, err) + + host := storagetest.NewStorageHost() + host.WithExtension(jaegerstorage.ID, storageExtension) + + err = storageExtension.Start(context.Background(), host) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, storageExtension.Shutdown(context.Background())) }) + return host +} + +func makeRemoteSamplingExtension(t *testing.T, cfg component.Config) component.Host { + extensionFactory := NewFactory() + samplingExtension, err := extensionFactory.CreateExtension( + context.Background(), + extension.Settings{ + TelemetrySettings: component.TelemetrySettings{ + Logger: zap.L(), + TracerProvider: nooptrace.NewTracerProvider(), + }, + }, + cfg, + ) + require.NoError(t, err) + host := storagetest.NewStorageHost().WithExtension(ID, samplingExtension) + storageHost := makeStorageExtension(t, "foobar") + + require.NoError(t, samplingExtension.Start(context.Background(), storageHost)) + t.Cleanup(func() { require.NoError(t, samplingExtension.Shutdown(context.Background())) }) + return host +} + +func TestStartFileBasedProvider(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.File.Path = filepath.Join("..", "..", "..", "sampling-strategies.json") + cfg.Adaptive = nil + cfg.HTTP = nil + cfg.GRPC = nil + require.NoError(t, cfg.Validate()) + + ext, err := factory.CreateExtension(context.Background(), extension.Settings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, cfg) + require.NoError(t, err) + host := makeStorageExtension(t, "foobar") + require.NoError(t, ext.Start(context.Background(), host)) + require.NoError(t, ext.Shutdown(context.Background())) +} + +func TestStartHTTP(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.File.Path = filepath.Join("..", "..", "..", "sampling-strategies.json") + cfg.Adaptive = nil + cfg.HTTP = &confighttp.ServerConfig{ + Endpoint: "0.0.0.0:12345", + } + cfg.GRPC = nil + require.NoError(t, cfg.Validate()) + + ext, err := factory.CreateExtension(context.Background(), extension.Settings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, cfg) + require.NoError(t, err) + host := makeStorageExtension(t, "foobar") + require.NoError(t, ext.Start(context.Background(), host)) + + resp, err := http.Get("http://0.0.0.0:12345/api/sampling?service=foo") + require.NoError(t, err) + defer resp.Body.Close() + + require.Equal(t, http.StatusOK, resp.StatusCode) + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + + expectedResponse := `{ + "probabilisticSampling": { + "samplingRate": 0.8 + }, + "strategyType": 0 + }` + require.JSONEq(t, expectedResponse, string(body)) + + require.NoError(t, ext.Shutdown(context.Background())) +} + +func TestStartGRPC(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.File.Path = filepath.Join("..", "..", "..", "sampling-strategies.json") + cfg.Adaptive = nil + cfg.HTTP = nil + cfg.GRPC = &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: "0.0.0.0:12346", + Transport: "tcp", + }, + } + require.NoError(t, cfg.Validate()) + + ext, err := factory.CreateExtension(context.Background(), extension.Settings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, cfg) + require.NoError(t, err) + host := makeStorageExtension(t, "foobar") + require.NoError(t, ext.Start(context.Background(), host)) + + conn, err := grpc.NewClient("0.0.0.0:12346", grpc.WithTransportCredentials(insecure.NewCredentials())) + require.NoError(t, err) + defer conn.Close() + + c := api_v2.NewSamplingManagerClient(conn) + response, err := c.GetSamplingStrategy(context.Background(), &api_v2.SamplingStrategyParameters{ServiceName: "foo"}) + require.NoError(t, err) + require.Equal(t, 0.8, response.ProbabilisticSampling.SamplingRate) + + require.NoError(t, ext.Shutdown(context.Background())) +} + +func TestStartAdaptiveProvider(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.File = nil + cfg.Adaptive.SamplingStore = "foobar" + cfg.HTTP = nil + cfg.GRPC = nil + require.NoError(t, cfg.Validate()) + + ext, err := factory.CreateExtension(context.Background(), extension.Settings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, cfg) + require.NoError(t, err) + host := makeStorageExtension(t, "foobar") + require.NoError(t, ext.Start(context.Background(), host)) + require.NoError(t, ext.Shutdown(context.Background())) +} + +func TestStartAdaptiveStrategyProviderErrors(t *testing.T) { + host := storagetest.NewStorageHost() + ext := &rsExtension{ + cfg: &Config{ + Adaptive: &AdaptiveConfig{ + SamplingStore: "foobar", + }, + }, + } + err := ext.startAdaptiveStrategyProvider(host) + require.ErrorContains(t, err, "cannot find storage factory") +} + +func TestGetAdaptiveSamplingComponents(t *testing.T) { + // Success case + host := makeRemoteSamplingExtension(t, &Config{ + Adaptive: &AdaptiveConfig{ + SamplingStore: "foobar", + Options: adaptive.Options{ + FollowerLeaseRefreshInterval: 1, + LeaderLeaseRefreshInterval: 1, + AggregationBuckets: 1, + }, + }, + }) + + comps, err := GetAdaptiveSamplingComponents(host) + require.NoError(t, err) + assert.NotNil(t, comps.DistLock) + assert.NotNil(t, comps.SamplingStore) + assert.Equal(t, time.Duration(1), comps.Options.FollowerLeaseRefreshInterval) + assert.Equal(t, time.Duration(1), comps.Options.LeaderLeaseRefreshInterval) + assert.Equal(t, 1, comps.Options.AggregationBuckets) +} + +type wrongExtension struct{} + +func (*wrongExtension) Start(context.Context, component.Host) error { return nil } +func (*wrongExtension) Shutdown(context.Context) error { return nil } + +func TestGetAdaptiveSamplingComponentsErrors(t *testing.T) { + host := makeRemoteSamplingExtension(t, &Config{}) + _, err := GetAdaptiveSamplingComponents(host) + require.ErrorContains(t, err, "extension 'remote_sampling' is not configured for adaptive sampling") + + h1 := storagetest.NewStorageHost() + _, err = GetAdaptiveSamplingComponents(h1) + require.ErrorContains(t, err, "cannot find extension") + + h2 := h1.WithExtension(ID, &wrongExtension{}) + _, err = GetAdaptiveSamplingComponents(h2) + require.ErrorContains(t, err, "is not of type") +} + +func TestDependencies(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + ext, err := factory.CreateExtension(context.Background(), extension.Settings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, cfg) + require.NoError(t, err) + assert.Equal(t, []component.ID{jaegerstorage.ID}, ext.(*rsExtension).Dependencies()) +} diff --git a/cmd/jaeger/internal/extension/remotesampling/factory.go b/cmd/jaeger/internal/extension/remotesampling/factory.go new file mode 100644 index 00000000000..e3a1c9a5756 --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/factory.go @@ -0,0 +1,57 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configgrpc" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/extension" + + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" + "github.com/jaegertracing/jaeger/ports" +) + +// ComponentType is the name of this extension in configuration. +var ComponentType = component.MustNewType("remote_sampling") + +var ID = component.NewID(ComponentType) + +// NewFactory creates a factory for the jaeger remote sampling extension. +func NewFactory() extension.Factory { + return extension.NewFactory( + ComponentType, + createDefaultConfig, + createExtension, + component.StabilityLevelBeta, + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + HTTP: &confighttp.ServerConfig{ + Endpoint: ports.PortToHostPort(ports.CollectorHTTP + 100), + }, + GRPC: &configgrpc.ServerConfig{ + NetAddr: confignet.AddrConfig{ + Endpoint: ports.PortToHostPort(ports.CollectorGRPC + 100), + Transport: confignet.TransportTypeTCP, + }, + }, + File: &FileConfig{ + Path: "", // path needs to be specified + }, + Adaptive: &AdaptiveConfig{ + SamplingStore: "", // storage name needs to be specified + Options: adaptive.DefaultOptions(), + }, + } +} + +func createExtension(_ context.Context, set extension.Settings, cfg component.Config) (extension.Extension, error) { + return newExtension(cfg.(*Config), set.TelemetrySettings), nil +} diff --git a/cmd/jaeger/internal/extension/remotesampling/factory_test.go b/cmd/jaeger/internal/extension/remotesampling/factory_test.go new file mode 100644 index 00000000000..a6de996e02e --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/factory_test.go @@ -0,0 +1,28 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestCreateDefaultConfig(t *testing.T) { + cfg := createDefaultConfig().(*Config) + require.NotNil(t, cfg, "failed to create default config") + require.NoError(t, componenttest.CheckConfigStruct(cfg)) +} + +func TestCreateExtension(t *testing.T) { + cfg := createDefaultConfig().(*Config) + f := NewFactory() + r, err := f.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + assert.NotNil(t, r) +} diff --git a/cmd/jaeger/internal/extension/remotesampling/package_test.go b/cmd/jaeger/internal/extension/remotesampling/package_test.go new file mode 100644 index 00000000000..5bd9ea71735 --- /dev/null +++ b/cmd/jaeger/internal/extension/remotesampling/package_test.go @@ -0,0 +1,14 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package remotesampling + +import ( + "testing" + + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/config.go b/cmd/jaeger/internal/processors/adaptivesampling/config.go new file mode 100644 index 00000000000..86f3a30c8d9 --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/config.go @@ -0,0 +1,18 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "go.opentelemetry.io/collector/component" +) + +var _ component.ConfigValidator = (*Config)(nil) + +type Config struct { + // all configuration for the processor is in the remotesampling extension +} + +func (*Config) Validate() error { + return nil +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/factory.go b/cmd/jaeger/internal/processors/adaptivesampling/factory.go new file mode 100644 index 00000000000..601dcd60317 --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/factory.go @@ -0,0 +1,48 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processorhelper" +) + +// componentType is the name of this extension in configuration. +var componentType = component.MustNewType("adaptive_sampling") + +// NewFactory creates a factory for the jaeger remote sampling extension. +func NewFactory() processor.Factory { + return processor.NewFactory( + componentType, + createDefaultConfig, + processor.WithTraces(createTracesProcessor, component.StabilityLevelBeta), + ) +} + +func createDefaultConfig() component.Config { + return &Config{} +} + +func createTracesProcessor( + ctx context.Context, + set processor.Settings, + cfg component.Config, + nextConsumer consumer.Traces, +) (processor.Traces, error) { + oCfg := cfg.(*Config) + sp := newTraceProcessor(*oCfg, set.TelemetrySettings) + return processorhelper.NewTracesProcessor( + ctx, + set, + cfg, + nextConsumer, + sp.processTraces, + processorhelper.WithStart(sp.start), + processorhelper.WithShutdown(sp.close), + ) +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/factory_test.go b/cmd/jaeger/internal/processors/adaptivesampling/factory_test.go new file mode 100644 index 00000000000..85e95b19cd0 --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/factory_test.go @@ -0,0 +1,39 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestCreateDefaultConfig(t *testing.T) { + cfg := createDefaultConfig().(*Config) + require.NotNil(t, cfg, "failed to create default config") + require.NoError(t, componenttest.CheckConfigStruct(cfg)) + require.NoError(t, cfg.Validate()) +} + +func TestCreateTracesProcessor(t *testing.T) { + ctx := context.Background() + cfg := createDefaultConfig().(*Config) + + nextConsumer := consumertest.NewNop() + set := processortest.NewNopSettings() + + tracesProcessor, err := createTracesProcessor(ctx, set, cfg, nextConsumer) + require.NoError(t, err) + assert.NotNil(t, tracesProcessor) +} + +func TestFactoryType(t *testing.T) { + factory := NewFactory() + assert.Equal(t, componentType, factory.Type()) +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/package_test.go b/cmd/jaeger/internal/processors/adaptivesampling/package_test.go new file mode 100644 index 00000000000..10d464704eb --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/package_test.go @@ -0,0 +1,14 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "testing" + + "github.com/jaegertracing/jaeger/pkg/testutils" +) + +func TestMain(m *testing.M) { + testutils.VerifyGoLeaks(m) +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/processor.go b/cmd/jaeger/internal/processors/adaptivesampling/processor.go new file mode 100644 index 00000000000..9573b2257a3 --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/processor.go @@ -0,0 +1,82 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "context" + "fmt" + + otlp2jaeger "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/ptrace" + + "github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/remotesampling" + "github.com/jaegertracing/jaeger/internal/metrics/otelmetrics" + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" +) + +type traceProcessor struct { + config *Config + aggregator samplingstrategy.Aggregator + telset component.TelemetrySettings +} + +func newTraceProcessor(cfg Config, telset component.TelemetrySettings) *traceProcessor { + return &traceProcessor{ + config: &cfg, + telset: telset, + } +} + +func (tp *traceProcessor) start(_ context.Context, host component.Host) error { + parts, err := remotesampling.GetAdaptiveSamplingComponents(host) + if err != nil { + return fmt.Errorf( + "cannot load adaptive sampling components from `%s` extension: %w", + remotesampling.ComponentType, err) + } + + agg, err := adaptive.NewAggregator( + *parts.Options, + tp.telset.Logger, + otelmetrics.NewFactory(tp.telset.MeterProvider), + parts.DistLock, + parts.SamplingStore, + ) + if err != nil { + return fmt.Errorf("failed to create the adaptive sampling aggregator: %w", err) + } + + agg.Start() + tp.aggregator = agg + + return nil +} + +func (tp *traceProcessor) close(context.Context) error { + if tp.aggregator != nil { + if err := tp.aggregator.Close(); err != nil { + return fmt.Errorf("failed to stop the adaptive sampling aggregator : %w", err) + } + } + return nil +} + +func (tp *traceProcessor) processTraces(_ context.Context, td ptrace.Traces) (ptrace.Traces, error) { + batches, err := otlp2jaeger.ProtoFromTraces(td) + if err != nil { + return td, fmt.Errorf("cannot transform OTLP traces to Jaeger format: %w", err) + } + + for _, batch := range batches { + for _, span := range batch.Spans { + if span.Process == nil { + span.Process = batch.Process + } + adaptive.RecordThroughput(tp.aggregator, span, tp.telset.Logger) + } + } + return td, nil +} diff --git a/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go b/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go new file mode 100644 index 00000000000..3c8561dc7d4 --- /dev/null +++ b/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go @@ -0,0 +1,171 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package adaptivesampling + +import ( + "context" + "errors" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/pdata/ptrace" + noopmetric "go.opentelemetry.io/otel/metric/noop" + nooptrace "go.opentelemetry.io/otel/trace/noop" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" + + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" + "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/remotesampling" + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/sampling/strategyprovider/adaptive" + "github.com/jaegertracing/jaeger/plugin/storage/memory" +) + +type samplingHost struct { + t *testing.T + samplingExtension component.Component +} + +func (host samplingHost) GetExtensions() map[component.ID]component.Component { + return map[component.ID]component.Component{ + remotesampling.ID: host.samplingExtension, + } +} + +func (host samplingHost) ReportFatalError(err error) { + host.t.Fatal(err) +} + +func (samplingHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { return nil } +func (samplingHost) GetExporters() map[component.DataType]map[component.ID]component.Component { + return nil +} + +func makeStorageExtension(t *testing.T, memstoreName string) component.Host { + telemetrySettings := component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), + TracerProvider: nooptrace.NewTracerProvider(), + MeterProvider: noopmetric.NewMeterProvider(), + } + extensionFactory := jaegerstorage.NewFactory() + storageExtension, err := extensionFactory.CreateExtension( + context.Background(), + extension.Settings{ + TelemetrySettings: telemetrySettings, + }, + &jaegerstorage.Config{Backends: map[string]jaegerstorage.Backend{ + memstoreName: {Memory: &memory.Configuration{MaxTraces: 10000}}, + }}, + ) + require.NoError(t, err) + + host := storagetest.NewStorageHost() + host.WithExtension(jaegerstorage.ID, storageExtension) + + err = storageExtension.Start(context.Background(), host) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, storageExtension.Shutdown(context.Background())) }) + return host +} + +var _ component.Config = (*Config)(nil) + +func makeRemoteSamplingExtension(t *testing.T, cfg component.Config) samplingHost { + extensionFactory := remotesampling.NewFactory() + samplingExtension, err := extensionFactory.CreateExtension( + context.Background(), + extension.Settings{ + TelemetrySettings: component.TelemetrySettings{ + Logger: zap.L(), + TracerProvider: nooptrace.NewTracerProvider(), + }, + }, + cfg, + ) + require.NoError(t, err) + host := samplingHost{t: t, samplingExtension: samplingExtension} + storageHost := makeStorageExtension(t, "foobar") + + err = samplingExtension.Start(context.Background(), storageHost) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, samplingExtension.Shutdown(context.Background())) }) + return host +} + +func TestNewTraceProcessor(t *testing.T) { + telemetrySettings := component.TelemetrySettings{ + Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())), + } + config, ok := createDefaultConfig().(*Config) + require.True(t, ok) + newTraceProcessor := newTraceProcessor(*config, telemetrySettings) + require.NotNil(t, newTraceProcessor) +} + +func TestTraceProcessor(t *testing.T) { + telemetrySettings := component.TelemetrySettings{ + Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())), + MeterProvider: noopmetric.NewMeterProvider(), + } + config := createDefaultConfig().(*Config) + traceProcessor := newTraceProcessor(*config, telemetrySettings) + + rsCfg := &remotesampling.Config{ + Adaptive: &remotesampling.AdaptiveConfig{ + SamplingStore: "foobar", + Options: adaptive.DefaultOptions(), + }, + } + host := makeRemoteSamplingExtension(t, rsCfg) + + rsCfg.Adaptive.Options.AggregationBuckets = 0 + err := traceProcessor.start(context.Background(), host) + require.ErrorContains(t, err, "AggregationBuckets must be greater than 0") + + rsCfg.Adaptive.Options = adaptive.DefaultOptions() + require.NoError(t, traceProcessor.start(context.Background(), host)) + + twww := makeTracesOneSpan() + trace, err := traceProcessor.processTraces(context.Background(), twww) + require.NoError(t, err) + require.NotNil(t, trace) + + err = traceProcessor.close(context.Background()) + require.NoError(t, err) +} + +func makeTracesOneSpan() ptrace.Traces { + traces := ptrace.NewTraces() + rSpans := traces.ResourceSpans().AppendEmpty() + sSpans := rSpans.ScopeSpans().AppendEmpty() + span := sSpans.Spans().AppendEmpty() + span.SetName("test") + return traces +} + +func TestGetAdaptiveSamplingComponentsError(t *testing.T) { + host := &samplingHost{} + processor := &traceProcessor{} + err := processor.start(context.Background(), host) + require.ErrorContains(t, err, "cannot load adaptive sampling components") +} + +// aggregator that returns error from Close() +type notClosingAgg struct{} + +func (*notClosingAgg) Close() error { return errors.New("not closing") } + +func (*notClosingAgg) HandleRootSpan(*model.Span, *zap.Logger) {} +func (*notClosingAgg) RecordThroughput(string, string, model.SamplerType, float64) {} +func (*notClosingAgg) Start() {} + +func TestTraceProcessorCloseError(t *testing.T) { + processor := &traceProcessor{ + aggregator: ¬ClosingAgg{}, + } + require.ErrorContains(t, processor.close(context.Background()), "not closing") +} diff --git a/cmd/jaeger/sampling-strategies.json b/cmd/jaeger/sampling-strategies.json new file mode 100644 index 00000000000..6928e6d0436 --- /dev/null +++ b/cmd/jaeger/sampling-strategies.json @@ -0,0 +1,18 @@ +{ + "default_strategy": { + "type": "probabilistic", + "param": 0.1 + }, + "service_strategies": [ + { + "service": "foo", + "type": "probabilistic", + "param": 0.8 + }, + { + "service": "bar", + "type": "ratelimiting", + "param": 1 + } + ] +} diff --git a/go.mod b/go.mod index 59136d270ac..7a481f11851 100644 --- a/go.mod +++ b/go.mod @@ -92,6 +92,11 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) +require ( + go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect +) + require ( github.com/IBM/sarama v1.43.2 // indirect github.com/aws/aws-sdk-go v1.53.11 // indirect @@ -192,7 +197,7 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.104.0 // indirect go.opentelemetry.io/collector/config/configcompression v1.11.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.104.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.104.0 go.opentelemetry.io/collector/config/configopaque v1.11.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/config/internal v0.104.0 // indirect diff --git a/pkg/clientcfg/clientcfghttp/handler.go b/pkg/clientcfg/clientcfghttp/handler.go index ab2cef08c5d..7bc22be9a4e 100644 --- a/pkg/clientcfg/clientcfghttp/handler.go +++ b/pkg/clientcfg/clientcfghttp/handler.go @@ -109,6 +109,17 @@ func (h *HTTPHandler) RegisterRoutes(router *mux.Router) { }).Methods(http.MethodGet) } +// RegisterRoutes registers configuration handlers with HTTP Router. +func (h *HTTPHandler) RegisterRoutesWithHTTP(router *http.ServeMux) { + prefix := h.params.BasePath + router.HandleFunc( + prefix+"/", + func(w http.ResponseWriter, r *http.Request) { + h.serveSamplingHTTP(w, r, h.encodeThriftLegacy) + }, + ) +} + func (h *HTTPHandler) serviceFromRequest(w http.ResponseWriter, r *http.Request) (string, error) { services := r.URL.Query()["service"] if len(services) != 1 { diff --git a/pkg/clientcfg/clientcfghttp/handler_test.go b/pkg/clientcfg/clientcfghttp/handler_test.go index 6afc30d61b2..723047c1ed3 100644 --- a/pkg/clientcfg/clientcfghttp/handler_test.go +++ b/pkg/clientcfg/clientcfghttp/handler_test.go @@ -47,6 +47,7 @@ func withServer( basePath string, mockSamplingResponse *api_v2.SamplingStrategyResponse, mockBaggageResponse []*baggage.BaggageRestriction, + withGorilla bool, testFn func(server *testServer), ) { metricsFactory := metricstest.NewFactory(0) @@ -62,9 +63,18 @@ func withServer( BasePath: basePath, LegacySamplingEndpoint: true, }) - r := mux.NewRouter() - handler.RegisterRoutes(r) - server := httptest.NewServer(r) + + var server *httptest.Server + if withGorilla { + r := mux.NewRouter() + handler.RegisterRoutes(r) + server = httptest.NewServer(r) + } else { + mux := http.NewServeMux() + handler.RegisterRoutesWithHTTP(mux) + server = httptest.NewServer(mux) + } + defer server.Close() testFn(&testServer{ metricsFactory: metricsFactory, @@ -76,15 +86,17 @@ func withServer( } func TestHTTPHandler(t *testing.T) { + testGorillaHTTPHandler(t, "") testHTTPHandler(t, "") } func TestHTTPHandlerWithBasePath(t *testing.T) { + testGorillaHTTPHandler(t, "/foo") testHTTPHandler(t, "/foo") } -func testHTTPHandler(t *testing.T, basePath string) { - withServer(basePath, rateLimiting(42), restrictions("luggage", 10), func(ts *testServer) { +func testGorillaHTTPHandler(t *testing.T, basePath string) { + withServer(basePath, rateLimiting(42), restrictions("luggage", 10), true, func(ts *testServer) { tests := []struct { endpoint string expOutput string @@ -146,6 +158,49 @@ func testHTTPHandler(t *testing.T, basePath string) { }) } +func testHTTPHandler(t *testing.T, basePath string) { + withServer(basePath, rateLimiting(42), restrictions("luggage", 10), false, func(ts *testServer) { + tests := []struct { + endpoint string + expOutput string + }{ + { + endpoint: "/", + expOutput: `{"strategyType":1,"rateLimitingSampling":{"maxTracesPerSecond":42}}`, + }, + } + for _, test := range tests { + t.Run("endpoint="+test.endpoint, func(t *testing.T) { + resp, err := http.Get(ts.server.URL + basePath + test.endpoint + "?service=Y") + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + err = resp.Body.Close() + require.NoError(t, err) + assert.Equal(t, test.expOutput, string(body)) + if test.endpoint == "/" { + objResp := &tSampling092.SamplingStrategyResponse{} + require.NoError(t, json.Unmarshal(body, objResp)) + assert.EqualValues(t, + ts.samplingProvider.samplingResponse.GetStrategyType(), + objResp.GetStrategyType()) + assert.EqualValues(t, + ts.samplingProvider.samplingResponse.GetRateLimitingSampling().GetMaxTracesPerSecond(), + objResp.GetRateLimitingSampling().GetMaxTracesPerSecond()) + } else { + objResp, err := p2json.SamplingStrategyResponseFromJSON(body) + require.NoError(t, err) + assert.EqualValues(t, ts.samplingProvider.samplingResponse, objResp) + } + }) + } + + // handler must emit metrics + ts.metricsFactory.AssertCounterMetrics(t, metricstest.ExpectedMetric{Name: "http-server.requests", Tags: map[string]string{"type": "sampling-legacy"}, Value: 1}) + }) +} + func TestHTTPHandlerErrors(t *testing.T) { testCases := []struct { description string @@ -215,61 +270,67 @@ func TestHTTPHandlerErrors(t *testing.T) { for _, tc := range testCases { testCase := tc // capture loop var t.Run(testCase.description, func(t *testing.T) { - withServer("", testCase.mockSamplingResponse, testCase.mockBaggageResponse, func(ts *testServer) { - resp, err := http.Get(ts.server.URL + testCase.url) - require.NoError(t, err) - assert.Equal(t, testCase.statusCode, resp.StatusCode) - if testCase.body != "" { - body, err := io.ReadAll(resp.Body) + for _, withGorilla := range []bool{true, false} { + withServer("", testCase.mockSamplingResponse, testCase.mockBaggageResponse, withGorilla, func(ts *testServer) { + resp, err := http.Get(ts.server.URL + testCase.url) require.NoError(t, err) - assert.Equal(t, testCase.body, string(body)) - } + assert.Equal(t, testCase.statusCode, resp.StatusCode) + if testCase.body != "" { + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + assert.Equal(t, testCase.body, string(body)) + } - if len(testCase.metrics) > 0 { - ts.metricsFactory.AssertCounterMetrics(t, testCase.metrics...) - } - }) + if len(testCase.metrics) > 0 { + ts.metricsFactory.AssertCounterMetrics(t, testCase.metrics...) + } + }) + } }) } t.Run("failure to write a response", func(t *testing.T) { - withServer("", probabilistic(0.001), restrictions("luggage", 10), func(ts *testServer) { - handler := ts.handler + for _, withGorilla := range []bool{true, false} { + withServer("", probabilistic(0.001), restrictions("luggage", 10), withGorilla, func(ts *testServer) { + handler := ts.handler - req := httptest.NewRequest("GET", "http://localhost:80/?service=X", nil) - w := &mockWriter{header: make(http.Header)} - handler.serveSamplingHTTP(w, req, handler.encodeThriftLegacy) + req := httptest.NewRequest("GET", "http://localhost:80/?service=X", nil) + w := &mockWriter{header: make(http.Header)} + handler.serveSamplingHTTP(w, req, handler.encodeThriftLegacy) - ts.metricsFactory.AssertCounterMetrics(t, - metricstest.ExpectedMetric{Name: "http-server.errors", Tags: map[string]string{"source": "write", "status": "5xx"}, Value: 1}) + ts.metricsFactory.AssertCounterMetrics(t, + metricstest.ExpectedMetric{Name: "http-server.errors", Tags: map[string]string{"source": "write", "status": "5xx"}, Value: 1}) - req = httptest.NewRequest("GET", "http://localhost:80/baggageRestrictions?service=X", nil) - handler.serveBaggageHTTP(w, req) + req = httptest.NewRequest("GET", "http://localhost:80/baggageRestrictions?service=X", nil) + handler.serveBaggageHTTP(w, req) - ts.metricsFactory.AssertCounterMetrics(t, - metricstest.ExpectedMetric{Name: "http-server.errors", Tags: map[string]string{"source": "write", "status": "5xx"}, Value: 2}) - }) + ts.metricsFactory.AssertCounterMetrics(t, + metricstest.ExpectedMetric{Name: "http-server.errors", Tags: map[string]string{"source": "write", "status": "5xx"}, Value: 2}) + }) + } }) } func TestEncodeErrors(t *testing.T) { - withServer("", nil, nil, func(server *testServer) { - _, err := server.handler.encodeThriftLegacy(&api_v2.SamplingStrategyResponse{ - StrategyType: -1, - }) - require.Error(t, err) - assert.Contains(t, err.Error(), "ConvertSamplingResponseFromDomain failed") - server.metricsFactory.AssertCounterMetrics(t, []metricstest.ExpectedMetric{ - {Name: "http-server.errors", Tags: map[string]string{"source": "thrift", "status": "5xx"}, Value: 1}, - }...) + for _, withGorilla := range []bool{true, false} { + withServer("", nil, nil, withGorilla, func(server *testServer) { + _, err := server.handler.encodeThriftLegacy(&api_v2.SamplingStrategyResponse{ + StrategyType: -1, + }) + require.Error(t, err) + assert.Contains(t, err.Error(), "ConvertSamplingResponseFromDomain failed") + server.metricsFactory.AssertCounterMetrics(t, []metricstest.ExpectedMetric{ + {Name: "http-server.errors", Tags: map[string]string{"source": "thrift", "status": "5xx"}, Value: 1}, + }...) - _, err = server.handler.encodeProto(nil) - require.Error(t, err) - assert.Contains(t, err.Error(), "SamplingStrategyResponseToJSON failed") - server.metricsFactory.AssertCounterMetrics(t, []metricstest.ExpectedMetric{ - {Name: "http-server.errors", Tags: map[string]string{"source": "proto", "status": "5xx"}, Value: 1}, - }...) - }) + _, err = server.handler.encodeProto(nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "SamplingStrategyResponseToJSON failed") + server.metricsFactory.AssertCounterMetrics(t, []metricstest.ExpectedMetric{ + {Name: "http-server.errors", Tags: map[string]string{"source": "proto", "status": "5xx"}, Value: 1}, + }...) + }) + } } func rateLimiting(rate int32) *api_v2.SamplingStrategyResponse { diff --git a/plugin/sampling/strategyprovider/adaptive/aggregator.go b/plugin/sampling/strategyprovider/adaptive/aggregator.go index 97b8e69399c..5fe4fcd59dd 100644 --- a/plugin/sampling/strategyprovider/adaptive/aggregator.go +++ b/plugin/sampling/strategyprovider/adaptive/aggregator.go @@ -129,6 +129,23 @@ func (a *aggregator) RecordThroughput(service, operation string, samplerType spa } } +func RecordThroughput(agg samplingstrategy.Aggregator, span *span_model.Span, logger *zap.Logger) { + // TODO simply checking parentId to determine if a span is a root span is not sufficient. However, + // we can be sure that only a root span will have sampler tags. + if span.ParentSpanID() != span_model.NewSpanID(0) { + return + } + service := span.Process.ServiceName + if service == "" || span.OperationName == "" { + return + } + samplerType, samplerParam := span.GetSamplerParams(logger) + if samplerType == span_model.SamplerTypeUnrecognized { + return + } + agg.RecordThroughput(service, span.OperationName, samplerType, samplerParam) +} + func (a *aggregator) Start() { a.postAggregator.Start() diff --git a/plugin/sampling/strategyprovider/adaptive/aggregator_test.go b/plugin/sampling/strategyprovider/adaptive/aggregator_test.go index bd34c3cb016..9e4247635d4 100644 --- a/plugin/sampling/strategyprovider/adaptive/aggregator_test.go +++ b/plugin/sampling/strategyprovider/adaptive/aggregator_test.go @@ -155,3 +155,44 @@ func TestRecordThroughput(t *testing.T) { a.HandleRootSpan(span, logger) assert.EqualValues(t, 1, a.(*aggregator).currentThroughput["A"]["GET"].Count) } + +func TestRecordThroughputFunc(t *testing.T) { + metricsFactory := metricstest.NewFactory(0) + mockStorage := &mocks.Store{} + mockEP := &epmocks.ElectionParticipant{} + logger := zap.NewNop() + testOpts := Options{ + CalculationInterval: 1 * time.Second, + AggregationBuckets: 1, + BucketsForCalculation: 1, + } + + a, err := NewAggregator(testOpts, logger, metricsFactory, mockEP, mockStorage) + require.NoError(t, err) + + // Testing non-root span + span := &model.Span{References: []model.SpanRef{{SpanID: model.NewSpanID(1), RefType: model.ChildOf}}} + RecordThroughput(a, span, logger) + require.Empty(t, a.(*aggregator).currentThroughput) + + // Testing span with service name but no operation + span.References = []model.SpanRef{} + span.Process = &model.Process{ + ServiceName: "A", + } + RecordThroughput(a, span, logger) + require.Empty(t, a.(*aggregator).currentThroughput) + + // Testing span with service name and operation but no probabilistic sampling tags + span.OperationName = "GET" + RecordThroughput(a, span, logger) + require.Empty(t, a.(*aggregator).currentThroughput) + + // Testing span with service name, operation, and probabilistic sampling tags + span.Tags = model.KeyValues{ + model.String("sampler.type", "probabilistic"), + model.String("sampler.param", "0.001"), + } + RecordThroughput(a, span, logger) + assert.EqualValues(t, 1, a.(*aggregator).currentThroughput["A"]["GET"].Count) +} diff --git a/plugin/sampling/strategyprovider/adaptive/options.go b/plugin/sampling/strategyprovider/adaptive/options.go index 64288632dbf..4eb13361443 100644 --- a/plugin/sampling/strategyprovider/adaptive/options.go +++ b/plugin/sampling/strategyprovider/adaptive/options.go @@ -53,7 +53,7 @@ const ( type Options struct { // TargetSamplesPerSecond is the global target rate of samples per operation. // TODO implement manual overrides per service/operation. - TargetSamplesPerSecond float64 + TargetSamplesPerSecond float64 `mapstructure:"target_samples_per_second"` // DeltaTolerance is the acceptable amount of deviation between the observed and the desired (target) // throughput for an operation, expressed as a ratio. For example, the value of 0.3 (30% deviation) @@ -62,23 +62,23 @@ type Options struct { // in the PID Controller terminology) to the sampler in the application. // // Increase this to reduce the amount of fluctuation in the calculated probabilities. - DeltaTolerance float64 + DeltaTolerance float64 `mapstructure:"delta_tolerance"` // CalculationInterval determines how often new probabilities are calculated. E.g. if it is 1 minute, // new sampling probabilities are calculated once a minute and each bucket will contain 1 minute worth // of aggregated throughput data. - CalculationInterval time.Duration + CalculationInterval time.Duration `mapstructure:"calculation_interval"` // AggregationBuckets is the total number of aggregated throughput buckets kept in memory, ie. if // the CalculationInterval is 1 minute (each bucket contains 1 minute of thoughput data) and the // AggregationBuckets is 3, the adaptive sampling processor will keep at most 3 buckets in memory for // all operations. // TODO(wjang): Expand on why this is needed when BucketsForCalculation seems to suffice. - AggregationBuckets int + AggregationBuckets int `mapstructure:"aggregation_buckets"` // BucketsForCalculation determines how many previous buckets used in calculating the weighted QPS, // ie. if BucketsForCalculation is 1, only the most recent bucket will be used in calculating the weighted QPS. - BucketsForCalculation int + BucketsForCalculation int `mapstructure:"calculation_buckets"` // Delay is the amount of time to delay probability generation by, ie. if the CalculationInterval // is 1 minute, the number of buckets is 10, and the delay is 2 minutes, then at one time @@ -88,29 +88,45 @@ type Options struct { // during any 1 minute interval, the clients will be fetching new probabilities in a uniformly // distributed manner throughout the 1 minute window. By setting the delay to 2 minutes, we can // guarantee that all clients can use the latest calculated probabilities for at least 1 minute. - Delay time.Duration + Delay time.Duration `mapstructure:"calculation_delay"` // InitialSamplingProbability is the initial sampling probability for all new operations. - InitialSamplingProbability float64 + InitialSamplingProbability float64 `mapstructure:"initial_sampling_probability"` // MinSamplingProbability is the minimum sampling probability for all operations. ie. the calculated sampling // probability will be in the range [MinSamplingProbability, 1.0]. - MinSamplingProbability float64 + MinSamplingProbability float64 `mapstructure:"min_sampling_probability"` // MinSamplesPerSecond determines the min number of traces that are sampled per second. // For example, if the value is 0.01666666666 (one every minute), then the sampling processor will do // its best to sample at least one trace a minute for an operation. This is useful for low QPS operations // that may never be sampled by the probabilistic sampler. - MinSamplesPerSecond float64 + MinSamplesPerSecond float64 `mapstructure:"min_samples_per_second"` // LeaderLeaseRefreshInterval is the duration to sleep if this processor is elected leader before // attempting to renew the lease on the leader lock. NB. This should be less than FollowerLeaseRefreshInterval // to reduce lock thrashing. - LeaderLeaseRefreshInterval time.Duration + LeaderLeaseRefreshInterval time.Duration `mapstructure:"leader_lease_refresh_interval"` // FollowerLeaseRefreshInterval is the duration to sleep if this processor is a follower // (ie. failed to gain the leader lock). - FollowerLeaseRefreshInterval time.Duration + FollowerLeaseRefreshInterval time.Duration `mapstructure:"follower_lease_refresh_interval"` +} + +func DefaultOptions() Options { + return Options{ + TargetSamplesPerSecond: defaultTargetSamplesPerSecond, + DeltaTolerance: defaultDeltaTolerance, + BucketsForCalculation: defaultBucketsForCalculation, + CalculationInterval: defaultCalculationInterval, + AggregationBuckets: defaultAggregationBuckets, + Delay: defaultDelay, + InitialSamplingProbability: defaultInitialSamplingProbability, + MinSamplingProbability: defaultMinSamplingProbability, + MinSamplesPerSecond: defaultMinSamplesPerSecond, + LeaderLeaseRefreshInterval: defaultLeaderLeaseRefreshInterval, + FollowerLeaseRefreshInterval: defaultFollowerLeaseRefreshInterval, + } } // AddFlags adds flags for Options diff --git a/plugin/sampling/strategyprovider/adaptive/options_test.go b/plugin/sampling/strategyprovider/adaptive/options_test.go index 1ab64c0589c..e441ad1472b 100644 --- a/plugin/sampling/strategyprovider/adaptive/options_test.go +++ b/plugin/sampling/strategyprovider/adaptive/options_test.go @@ -43,3 +43,18 @@ func TestOptionsWithFlags(t *testing.T) { assert.Equal(t, time.Duration(5000000000), opts.LeaderLeaseRefreshInterval) assert.Equal(t, time.Duration(60000000000), opts.FollowerLeaseRefreshInterval) } + +func TestDefaultOptions(t *testing.T) { + options := DefaultOptions() + assert.Equal(t, float64(defaultTargetSamplesPerSecond), options.TargetSamplesPerSecond) + assert.Equal(t, defaultDeltaTolerance, options.DeltaTolerance) + assert.Equal(t, defaultBucketsForCalculation, options.BucketsForCalculation) + assert.Equal(t, defaultCalculationInterval, options.CalculationInterval) + assert.Equal(t, defaultAggregationBuckets, options.AggregationBuckets) + assert.Equal(t, defaultDelay, options.Delay) + assert.Equal(t, defaultInitialSamplingProbability, options.InitialSamplingProbability) + assert.Equal(t, defaultMinSamplingProbability, options.MinSamplingProbability) + assert.Equal(t, defaultMinSamplesPerSecond, options.MinSamplesPerSecond) + assert.Equal(t, defaultLeaderLeaseRefreshInterval, options.LeaderLeaseRefreshInterval) + assert.Equal(t, defaultFollowerLeaseRefreshInterval, options.FollowerLeaseRefreshInterval) +} From 1e1b0a1f947e05e38a6c5bee8cca329866566395 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 14 Jul 2024 18:41:42 -0300 Subject: [PATCH 39/52] [cleanup] Use storagetest.NewStorageHost() from contrib (#5744) ## Which problem is this PR solving? - Simplify code Signed-off-by: Yuri Shkuro --- .../storageexporter/exporter_test.go | 3 +- .../extension/jaegerquery/server_test.go | 28 ++----------------- .../extension/jaegerstorage/extension_test.go | 25 ++--------------- .../adaptivesampling/processor_test.go | 27 ++---------------- 4 files changed, 10 insertions(+), 73 deletions(-) diff --git a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go index 3693b8ef1fe..cfe7a2b1e50 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go +++ b/cmd/jaeger/internal/exporters/storageexporter/exporter_test.go @@ -124,8 +124,7 @@ func TestExporter(t *testing.T) { host := makeStorageExtension(t, memstoreName) - err = tracesExporter.Start(ctx, host) - require.NoError(t, err) + require.NoError(t, tracesExporter.Start(ctx, host)) defer func() { require.NoError(t, tracesExporter.Shutdown(ctx)) }() diff --git a/cmd/jaeger/internal/extension/jaegerquery/server_test.go b/cmd/jaeger/internal/extension/jaegerquery/server_test.go index 73d165ed491..6ba3e963c5c 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server_test.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server_test.go @@ -10,6 +10,7 @@ import ( "testing" "time" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" @@ -80,27 +81,6 @@ func (fakeStorageExt) Shutdown(context.Context) error { return nil } -type storageHost struct { - extension component.Component -} - -func (storageHost) ReportFatalError(error) { -} - -func (host storageHost) GetExtensions() map[component.ID]component.Component { - return map[component.ID]component.Component{ - jaegerstorage.ID: host.extension, - } -} - -func (storageHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { - return nil -} - -func (storageHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return nil -} - func TestServerDependencies(t *testing.T) { expectedDependencies := []component.ID{jaegerstorage.ID} telemetrySettings := component.TelemetrySettings{ @@ -114,9 +94,7 @@ func TestServerDependencies(t *testing.T) { } func TestServerStart(t *testing.T) { - host := storageHost{ - extension: fakeStorageExt{}, - } + host := storagetest.NewStorageHost().WithExtension(jaegerstorage.ID, fakeStorageExt{}) tests := []struct { name string config *Config @@ -251,7 +229,7 @@ func TestServerAddArchiveStorage(t *testing.T) { } server := newServer(tt.config, telemetrySettings) if tt.extension != nil { - host = storageHost{extension: tt.extension} + host = storagetest.NewStorageHost().WithExtension(jaegerstorage.ID, tt.extension) } err := server.addArchiveStorage(tt.qSvcOpts, host) if tt.expectedErr == "" { diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go index 5a9bd7c4a9a..b05ef36474a 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension_test.go @@ -11,6 +11,7 @@ import ( "net/http/httptest" "testing" + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" @@ -31,26 +32,6 @@ import ( "github.com/jaegertracing/jaeger/storage/spanstore" ) -type storageHost struct { - t *testing.T - ext component.Component -} - -func (host storageHost) GetExtensions() map[component.ID]component.Component { - return map[component.ID]component.Component{ - ID: host.ext, - } -} - -func (host storageHost) ReportFatalError(err error) { - host.t.Fatal(err) -} - -func (storageHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { return nil } -func (storageHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return nil -} - type errorFactory struct { closeErr error } @@ -81,7 +62,7 @@ func TestStorageFactoryBadHostError(t *testing.T) { } func TestStorageFactoryBadNameError(t *testing.T) { - host := storageHost{t: t, ext: startStorageExtension(t, "foo")} + host := storagetest.NewStorageHost().WithExtension(ID, startStorageExtension(t, "foo")) _, err := GetStorageFactory("bar", host) require.ErrorContains(t, err, "cannot find definition of storage 'bar'") } @@ -105,7 +86,7 @@ func TestGetFactoryV2Error(t *testing.T) { func TestGetFactory(t *testing.T) { const name = "foo" - host := storageHost{t: t, ext: startStorageExtension(t, name)} + host := storagetest.NewStorageHost().WithExtension(ID, startStorageExtension(t, name)) f, err := GetStorageFactory(name, host) require.NoError(t, err) require.NotNil(t, f) diff --git a/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go b/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go index 3c8561dc7d4..69e7d83fe8f 100644 --- a/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go +++ b/cmd/jaeger/internal/processors/adaptivesampling/processor_test.go @@ -25,26 +25,6 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage/memory" ) -type samplingHost struct { - t *testing.T - samplingExtension component.Component -} - -func (host samplingHost) GetExtensions() map[component.ID]component.Component { - return map[component.ID]component.Component{ - remotesampling.ID: host.samplingExtension, - } -} - -func (host samplingHost) ReportFatalError(err error) { - host.t.Fatal(err) -} - -func (samplingHost) GetFactory(_ component.Kind, _ component.Type) component.Factory { return nil } -func (samplingHost) GetExporters() map[component.DataType]map[component.ID]component.Component { - return nil -} - func makeStorageExtension(t *testing.T, memstoreName string) component.Host { telemetrySettings := component.TelemetrySettings{ Logger: zaptest.NewLogger(t), @@ -74,7 +54,7 @@ func makeStorageExtension(t *testing.T, memstoreName string) component.Host { var _ component.Config = (*Config)(nil) -func makeRemoteSamplingExtension(t *testing.T, cfg component.Config) samplingHost { +func makeRemoteSamplingExtension(t *testing.T, cfg component.Config) component.Host { extensionFactory := remotesampling.NewFactory() samplingExtension, err := extensionFactory.CreateExtension( context.Background(), @@ -87,7 +67,7 @@ func makeRemoteSamplingExtension(t *testing.T, cfg component.Config) samplingHos cfg, ) require.NoError(t, err) - host := samplingHost{t: t, samplingExtension: samplingExtension} + host := storagetest.NewStorageHost().WithExtension(remotesampling.ID, samplingExtension) storageHost := makeStorageExtension(t, "foobar") err = samplingExtension.Start(context.Background(), storageHost) @@ -148,9 +128,8 @@ func makeTracesOneSpan() ptrace.Traces { } func TestGetAdaptiveSamplingComponentsError(t *testing.T) { - host := &samplingHost{} processor := &traceProcessor{} - err := processor.start(context.Background(), host) + err := processor.start(context.Background(), storagetest.NewStorageHost()) require.ErrorContains(t, err, "cannot load adaptive sampling components") } From a41994447904733d798359aab083f9a69cb11ef0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:14:14 -0400 Subject: [PATCH 40/52] Disable GHA updates in dependabot and reduce frequency in renovatebot (#5746) * Move GHA updates to be fully owned by renovate bot * Reduce frequency to once a month * Fix a bug that blocked major upgrades --------- Signed-off-by: dependabot[bot] Signed-off-by: Yuri Shkuro Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yuri Shkuro --- .github/dependabot.yml | 6 ------ renovate.json | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 161bcb1159e..3678946f321 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -25,12 +25,6 @@ updates: interval: daily labels: [ "changelog:dependencies" ] - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - labels: [ "changelog:dependencies" ] - - package-ecosystem: docker directories: - /cmd/agent diff --git a/renovate.json b/renovate.json index 2f52d689897..ef7a5b20f83 100644 --- a/renovate.json +++ b/renovate.json @@ -32,11 +32,12 @@ }, { "matchManagers": ["github-actions"], - "groupName": "github-actions deps" + "groupName": "github-actions deps", + "schedule": ["on the first day of the month"] }, { "matchManagers": ["github-actions"], - "matchUpdateTypes": ["major", "patch", "digest"], + "matchUpdateTypes": ["patch", "digest"], "enabled": false }, { From 2151acfce789126975e5fa57d7a625c684c6adca Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 Jul 2024 20:29:52 +0200 Subject: [PATCH 41/52] Update anchore/sbom-action action to v0.17.0 (#5748) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [anchore/sbom-action](https://togithub.com/anchore/sbom-action) | action | minor | `v0.16.1` -> `v0.17.0` | --- ### Release Notes
anchore/sbom-action (anchore/sbom-action) ### [`v0.17.0`](https://togithub.com/anchore/sbom-action/releases/tag/v0.17.0) [Compare Source](https://togithub.com/anchore/sbom-action/compare/v0.16.1...v0.17.0) #### Changes in v0.17.0 - chore(deps): update Syft to v1.9.0 ([#​479](https://togithub.com/anchore/sbom-action/issues/479)) \[[anchore-actions-token-generator](https://togithub.com/anchore-actions-token-generator)] - chore(deps): bump actions/checkout from 4.1.6 to 4.1.7 ([#​474](https://togithub.com/anchore/sbom-action/issues/474)) \[[dependabot](https://togithub.com/dependabot)] - chore(deps): bump peter-evans/create-pull-request from 6.0.5 to 6.1.0 ([#​475](https://togithub.com/anchore/sbom-action/issues/475)) \[[dependabot](https://togithub.com/dependabot)] - chore: serialize tests to prevent install race ([#​478](https://togithub.com/anchore/sbom-action/issues/478)) \[[willmurphyscode](https://togithub.com/willmurphyscode)]
--- ### Configuration πŸ“… **Schedule**: Branch creation - "on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate Co-authored-by: Yuri Shkuro --- .github/workflows/ci-release-testing.yml | 2 +- .github/workflows/ci-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-release-testing.yml b/.github/workflows/ci-release-testing.yml index 9d2295f2971..bb586982118 100644 --- a/.github/workflows/ci-release-testing.yml +++ b/.github/workflows/ci-release-testing.yml @@ -88,7 +88,7 @@ jobs: QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Generate SBOM - uses: anchore/sbom-action@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1 + uses: anchore/sbom-action@d94f46e13c6c62f59525ac9a1e147a99dc0b9bf5 # v0.17.0 with: output-file: jaeger-SBOM.spdx.json upload-release-assets: false diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 580c6bc6606..448637c6146 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -112,7 +112,7 @@ jobs: QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Generate SBOM - uses: anchore/sbom-action@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1 + uses: anchore/sbom-action@d94f46e13c6c62f59525ac9a1e147a99dc0b9bf5 # v0.17.0 with: output-file: jaeger-SBOM.spdx.json upload-release-assets: false From 8d2aab6ed2e3b426016042161d9f73e460d6c076 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:39:55 -0400 Subject: [PATCH 42/52] Fix broken v2 config (#5747) Unfortunately, we don't seem to have CI validation for this config and it was broken since the recent config refactoring. --------- Signed-off-by: dependabot[bot] Signed-off-by: Yuri Shkuro Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yuri Shkuro --- cmd/jaeger/config.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd/jaeger/config.yaml b/cmd/jaeger/config.yaml index e34fb2ff7d6..dba80824d2d 100644 --- a/cmd/jaeger/config.yaml +++ b/cmd/jaeger/config.yaml @@ -14,23 +14,25 @@ extensions: # endpoint: 0.0.0.0:55679 jaeger_query: - trace_storage: memstore - trace_storage_archive: memstore_archive + trace_storage: some_store + trace_storage_archive: another_store ui_config: ./cmd/jaeger/config-ui.json jaeger_storage: - memory: - memstore: - max_traces: 100000 - memstore_archive: - max_traces: 100000 + backends: + some_store: + memory: + max_traces: 100000 + another_store: + memory: + max_traces: 100000 remote_sampling: # You can either use file or adaptive sampling strategy in remote_sampling # file: # path: ./cmd/jaeger/sampling-strategies.json adaptive: - sampling_store: memstore + sampling_store: some_store initial_sampling_probability: 0.1 http: grpc: @@ -58,4 +60,4 @@ processors: exporters: jaeger_storage_exporter: - trace_storage: memstore + trace_storage: some_store From 075444fe133887f1741b15288b755a823f0f6020 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Mon, 15 Jul 2024 23:45:09 -0300 Subject: [PATCH 43/52] Rationalize naming of GHA workflow files (#5750) ## Which problem is this PR solving? - Workflow file names were inconsistent and not well categorized ## Description of the changes - Rename files for better categorization Signed-off-by: Yuri Shkuro --- ...one-build.yml => ci-docker-all-in-one.yml} | 0 .../{ci-hotrod.yml => ci-docker-hotrod.yml} | 0 .../{ci-badger.yaml => ci-e2e-badger.yaml} | 0 ...{ci-cassandra.yml => ci-e2e-cassandra.yml} | 0 ...ticsearch.yml => ci-e2e-elasticsearch.yml} | 0 .../{ci-grpc.yml => ci-e2e-grpc.yml} | 0 .../{ci-kafka.yml => ci-e2e-kafka.yml} | 0 ...i-opensearch.yml => ci-e2e-opensearch.yml} | 0 .../{ci-build-spm.yml => ci-e2e-spm.yml} | 0 ...nfig.yml => ci-lint-dependabot-config.yml} | 0 ...rotogen-tests.yml => ci-lint-protogen.yml} | 0 .github/workflows/ci-release-testing.yml | 95 ------------------- .../{ci-label-check.yml => label-check.yml} | 0 13 files changed, 95 deletions(-) rename .github/workflows/{ci-all-in-one-build.yml => ci-docker-all-in-one.yml} (100%) rename .github/workflows/{ci-hotrod.yml => ci-docker-hotrod.yml} (100%) rename .github/workflows/{ci-badger.yaml => ci-e2e-badger.yaml} (100%) rename .github/workflows/{ci-cassandra.yml => ci-e2e-cassandra.yml} (100%) rename .github/workflows/{ci-elasticsearch.yml => ci-e2e-elasticsearch.yml} (100%) rename .github/workflows/{ci-grpc.yml => ci-e2e-grpc.yml} (100%) rename .github/workflows/{ci-kafka.yml => ci-e2e-kafka.yml} (100%) rename .github/workflows/{ci-opensearch.yml => ci-e2e-opensearch.yml} (100%) rename .github/workflows/{ci-build-spm.yml => ci-e2e-spm.yml} (100%) rename .github/workflows/{validate-dependabot-config.yml => ci-lint-dependabot-config.yml} (100%) rename .github/workflows/{ci-protogen-tests.yml => ci-lint-protogen.yml} (100%) delete mode 100644 .github/workflows/ci-release-testing.yml rename .github/workflows/{ci-label-check.yml => label-check.yml} (100%) diff --git a/.github/workflows/ci-all-in-one-build.yml b/.github/workflows/ci-docker-all-in-one.yml similarity index 100% rename from .github/workflows/ci-all-in-one-build.yml rename to .github/workflows/ci-docker-all-in-one.yml diff --git a/.github/workflows/ci-hotrod.yml b/.github/workflows/ci-docker-hotrod.yml similarity index 100% rename from .github/workflows/ci-hotrod.yml rename to .github/workflows/ci-docker-hotrod.yml diff --git a/.github/workflows/ci-badger.yaml b/.github/workflows/ci-e2e-badger.yaml similarity index 100% rename from .github/workflows/ci-badger.yaml rename to .github/workflows/ci-e2e-badger.yaml diff --git a/.github/workflows/ci-cassandra.yml b/.github/workflows/ci-e2e-cassandra.yml similarity index 100% rename from .github/workflows/ci-cassandra.yml rename to .github/workflows/ci-e2e-cassandra.yml diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-e2e-elasticsearch.yml similarity index 100% rename from .github/workflows/ci-elasticsearch.yml rename to .github/workflows/ci-e2e-elasticsearch.yml diff --git a/.github/workflows/ci-grpc.yml b/.github/workflows/ci-e2e-grpc.yml similarity index 100% rename from .github/workflows/ci-grpc.yml rename to .github/workflows/ci-e2e-grpc.yml diff --git a/.github/workflows/ci-kafka.yml b/.github/workflows/ci-e2e-kafka.yml similarity index 100% rename from .github/workflows/ci-kafka.yml rename to .github/workflows/ci-e2e-kafka.yml diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-e2e-opensearch.yml similarity index 100% rename from .github/workflows/ci-opensearch.yml rename to .github/workflows/ci-e2e-opensearch.yml diff --git a/.github/workflows/ci-build-spm.yml b/.github/workflows/ci-e2e-spm.yml similarity index 100% rename from .github/workflows/ci-build-spm.yml rename to .github/workflows/ci-e2e-spm.yml diff --git a/.github/workflows/validate-dependabot-config.yml b/.github/workflows/ci-lint-dependabot-config.yml similarity index 100% rename from .github/workflows/validate-dependabot-config.yml rename to .github/workflows/ci-lint-dependabot-config.yml diff --git a/.github/workflows/ci-protogen-tests.yml b/.github/workflows/ci-lint-protogen.yml similarity index 100% rename from .github/workflows/ci-protogen-tests.yml rename to .github/workflows/ci-lint-protogen.yml diff --git a/.github/workflows/ci-release-testing.yml b/.github/workflows/ci-release-testing.yml deleted file mode 100644 index bb586982118..00000000000 --- a/.github/workflows/ci-release-testing.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Publish release - -on: - # allow running release workflow manually - workflow_dispatch: - -# See https://github.com/jaegertracing/jaeger/issues/4017 -permissions: - contents: read - -jobs: - publish-release: - permissions: - contents: write - - runs-on: ubuntu-latest - - steps: - - - name: Disk size - run: df -g / - - - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 - with: - egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - submodules: true - - - name: Fetch git tags - run: | - git fetch --prune --unshallow --tags - - - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 - with: - go-version: 1.22.x - - - name: Setup Node.js version - uses: ./.github/actions/setup-node.js - - - name: Export BRANCH variable and validate it is a semver - # Many scripts depend on BRANCH variable. We do not want to - # use ./.github/actions/setup-branch here because it may set - # BRANCH=main when the workflow is triggered manually. - run: | - BRANCH=$(make echo-version) - echo "BRANCH=${BRANCH}" >> ${GITHUB_ENV} - echo Validate that the latest tag ${BRANCH} is in semver format - echo ${BRANCH} | grep -E '^v[0-9]+.[0-9]+.[0-9]+$' - - - name: Install tools - run: make install-ci - - - name: Configure GPG Key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Build binaries - run: make build-all-platforms - - - name: Package binaries - id: package-binaries - run: bash scripts/package-deploy.sh - - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 - - - name: Build all container images (do not push) - run: bash scripts/build-upload-docker-images.sh -l - env: - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - - - name: Build and test all-in-one image (do not push) - run: bash scripts/build-all-in-one-image.sh -l - env: - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - - - name: Build, test, and publish hotrod image - run: bash scripts/hotrod-integration-test.sh - env: - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - - - name: Generate SBOM - uses: anchore/sbom-action@d94f46e13c6c62f59525ac9a1e147a99dc0b9bf5 # v0.17.0 - with: - output-file: jaeger-SBOM.spdx.json - upload-release-assets: false - upload-artifact: false diff --git a/.github/workflows/ci-label-check.yml b/.github/workflows/label-check.yml similarity index 100% rename from .github/workflows/ci-label-check.yml rename to .github/workflows/label-check.yml From 67ddb2c053f20e1986d8218d7f836d9e80f603b9 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Tue, 16 Jul 2024 13:06:26 -0300 Subject: [PATCH 44/52] [v2] Add e2e test with memory store (#5751) ## Which problem is this PR solving? - Even though we were using memory storage in v2-e2e-grpc test, we never had an e2e that would validate `cmd/jaeger/config.yaml` config, which uses memory storage in-process ## Description of the changes - Add the new test workflow an e2e test - Rename other test files for more readable file names / test names ## How was this change tested? - build cmd/jaeger binary - `$ STORAGE=memory go test ./cmd/jaeger/internal/integration` --------- Signed-off-by: Yuri Shkuro --- .github/workflows/ci-e2e-memory.yaml | 41 +++++++++++++++++++ .../internal/integration/e2e_integration.go | 5 ++- .../{es_test.go => elasticsearch_test.go} | 2 +- .../internal/integration/memory_test.go | 27 ++++++++++++ .../{os_test.go => opensearch_test.go} | 2 +- .../integration/storagecleaner/extension.go | 16 ++++---- .../storagecleaner/extension_test.go | 10 ++++- plugin/storage/memory/factory.go | 9 ++++ plugin/storage/memory/memory.go | 7 ++++ 9 files changed, 107 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci-e2e-memory.yaml rename cmd/jaeger/internal/integration/{es_test.go => elasticsearch_test.go} (93%) create mode 100644 cmd/jaeger/internal/integration/memory_test.go rename cmd/jaeger/internal/integration/{os_test.go => opensearch_test.go} (93%) diff --git a/.github/workflows/ci-e2e-memory.yaml b/.github/workflows/ci-e2e-memory.yaml new file mode 100644 index 00000000000..3a8dce7d370 --- /dev/null +++ b/.github/workflows/ci-e2e-memory.yaml @@ -0,0 +1,41 @@ +name: CIT Memory + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + +jobs: + memory-v2: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version: 1.22.x + + - name: Run Memory storage integration tests + run: | + STORAGE=memory_v2 make jaeger-v2-storage-integration-test + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: memory_v2 diff --git a/cmd/jaeger/internal/integration/e2e_integration.go b/cmd/jaeger/internal/integration/e2e_integration.go index 6ddcb538cff..670b7b576d4 100644 --- a/cmd/jaeger/internal/integration/e2e_integration.go +++ b/cmd/jaeger/internal/integration/e2e_integration.go @@ -177,6 +177,7 @@ func createStorageCleanerConfig(t *testing.T, configFile string, storage string) func purge(t *testing.T) { addr := fmt.Sprintf("http://0.0.0.0:%s%s", storagecleaner.Port, storagecleaner.URL) + t.Logf("Purging storage via %s", addr) r, err := http.NewRequestWithContext(context.Background(), http.MethodPost, addr, nil) require.NoError(t, err) @@ -185,6 +186,8 @@ func purge(t *testing.T) { resp, err := client.Do(r) require.NoError(t, err) defer resp.Body.Close() + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) + require.Equal(t, http.StatusOK, resp.StatusCode, "body: %s", string(body)) } diff --git a/cmd/jaeger/internal/integration/es_test.go b/cmd/jaeger/internal/integration/elasticsearch_test.go similarity index 93% rename from cmd/jaeger/internal/integration/es_test.go rename to cmd/jaeger/internal/integration/elasticsearch_test.go index 92b9f0c79e0..2c78bfdb7af 100644 --- a/cmd/jaeger/internal/integration/es_test.go +++ b/cmd/jaeger/internal/integration/elasticsearch_test.go @@ -9,7 +9,7 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage/integration" ) -func TestESStorage(t *testing.T) { +func TestElasticsearchStorage(t *testing.T) { integration.SkipUnlessEnv(t, "elasticsearch") s := &E2EStorageIntegration{ diff --git a/cmd/jaeger/internal/integration/memory_test.go b/cmd/jaeger/internal/integration/memory_test.go new file mode 100644 index 00000000000..a2592b04a38 --- /dev/null +++ b/cmd/jaeger/internal/integration/memory_test.go @@ -0,0 +1,27 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import ( + "testing" + + "github.com/jaegertracing/jaeger/plugin/storage/integration" +) + +func TestMemoryStorage(t *testing.T) { + integration.SkipUnlessEnv(t, "memory_v2") + + s := &E2EStorageIntegration{ + ConfigFile: "../../config.yaml", + StorageIntegration: integration.StorageIntegration{ + SkipArchiveTest: true, + CleanUp: purge, + }, + } + s.e2eInitialize(t, "memory") + t.Cleanup(func() { + s.e2eCleanUp(t) + }) + s.RunAll(t) +} diff --git a/cmd/jaeger/internal/integration/os_test.go b/cmd/jaeger/internal/integration/opensearch_test.go similarity index 93% rename from cmd/jaeger/internal/integration/os_test.go rename to cmd/jaeger/internal/integration/opensearch_test.go index a5d3e945214..909c0be6510 100644 --- a/cmd/jaeger/internal/integration/os_test.go +++ b/cmd/jaeger/internal/integration/opensearch_test.go @@ -9,7 +9,7 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage/integration" ) -func TestOSStorage(t *testing.T) { +func TestOpenSearchStorage(t *testing.T) { integration.SkipUnlessEnv(t, "opensearch") s := &E2EStorageIntegration{ ConfigFile: "../../config-opensearch.yaml", diff --git a/cmd/jaeger/internal/integration/storagecleaner/extension.go b/cmd/jaeger/internal/integration/storagecleaner/extension.go index 2a8b37016e6..c49d9b7bff0 100644 --- a/cmd/jaeger/internal/integration/storagecleaner/extension.go +++ b/cmd/jaeger/internal/integration/storagecleaner/extension.go @@ -13,6 +13,7 @@ import ( "github.com/gorilla/mux" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" + "go.uber.org/zap" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" "github.com/jaegertracing/jaeger/storage" @@ -29,15 +30,15 @@ const ( ) type storageCleaner struct { - config *Config - server *http.Server - settings component.TelemetrySettings + config *Config + server *http.Server + telset component.TelemetrySettings } -func newStorageCleaner(config *Config, telemetrySettings component.TelemetrySettings) *storageCleaner { +func newStorageCleaner(config *Config, telset component.TelemetrySettings) *storageCleaner { return &storageCleaner{ - config: config, - settings: telemetrySettings, + config: config, + telset: telset, } } @@ -74,10 +75,11 @@ func (c *storageCleaner) Start(_ context.Context, host component.Host) error { Handler: r, ReadHeaderTimeout: 3 * time.Second, } + c.telset.Logger.Info("Starting storage cleaner server", zap.String("addr", c.server.Addr)) go func() { if err := c.server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { err = fmt.Errorf("error starting cleaner server: %w", err) - c.settings.ReportStatus(component.NewFatalErrorEvent(err)) + c.telset.ReportStatus(component.NewFatalErrorEvent(err)) } }() diff --git a/cmd/jaeger/internal/integration/storagecleaner/extension_test.go b/cmd/jaeger/internal/integration/storagecleaner/extension_test.go index a150e0f00ac..6f1290cf0b9 100644 --- a/cmd/jaeger/internal/integration/storagecleaner/extension_test.go +++ b/cmd/jaeger/internal/integration/storagecleaner/extension_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.uber.org/zap/zaptest" "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" "github.com/jaegertracing/jaeger/storage" @@ -84,7 +85,9 @@ func TestStorageCleanerExtension(t *testing.T) { TraceStorage: "storage", Port: Port, } - s := newStorageCleaner(config, component.TelemetrySettings{}) + s := newStorageCleaner(config, component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), + }) require.NotEmpty(t, s.Dependencies()) host := storagetest.NewStorageHost() host.WithExtension(jaegerstorage.ID, &mockStorageExt{ @@ -110,7 +113,9 @@ func TestStorageCleanerExtension(t *testing.T) { func TestGetStorageFactoryError(t *testing.T) { config := &Config{} - s := newStorageCleaner(config, component.TelemetrySettings{}) + s := newStorageCleaner(config, component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), + }) host := storagetest.NewStorageHost() host.WithExtension(jaegerstorage.ID, &mockStorageExt{ name: "storage", @@ -128,6 +133,7 @@ func TestStorageExtensionStartError(t *testing.T) { } var startStatus atomic.Pointer[component.StatusEvent] s := newStorageCleaner(config, component.TelemetrySettings{ + Logger: zaptest.NewLogger(t), ReportStatus: func(status *component.StatusEvent) { startStatus.Store(status) }, diff --git a/plugin/storage/memory/factory.go b/plugin/storage/memory/factory.go index 6c677b03d95..d9bfd6c113a 100644 --- a/plugin/storage/memory/factory.go +++ b/plugin/storage/memory/factory.go @@ -16,6 +16,7 @@ package memory import ( + "context" "flag" "github.com/spf13/viper" @@ -36,6 +37,7 @@ var ( // interface comformance checks _ storage.ArchiveFactory = (*Factory)(nil) _ storage.SamplingStoreFactory = (*Factory)(nil) _ plugin.Configurable = (*Factory)(nil) + _ storage.Purger = (*Factory)(nil) ) // Factory implements storage.Factory and creates storage components backed by memory store. @@ -126,3 +128,10 @@ func (*Factory) CreateLock() (distributedlock.Lock, error) { func (f *Factory) publishOpts() { safeexpvar.SetInt("jaeger_storage_memory_max_traces", int64(f.options.Configuration.MaxTraces)) } + +// Purge removes all data from the Factory's underlying Memory store. +// This function is intended for testing purposes only and should not be used in production environments. +func (f *Factory) Purge(ctx context.Context) error { + f.store.purge(ctx) + return nil +} diff --git a/plugin/storage/memory/memory.go b/plugin/storage/memory/memory.go index f92ae9949e9..9bac7d2b2bd 100644 --- a/plugin/storage/memory/memory.go +++ b/plugin/storage/memory/memory.go @@ -337,3 +337,10 @@ func flattenTags(span *model.Span) model.KeyValues { } return retMe } + +// purge supports Purger interface. +func (st *Store) purge(context.Context) { + st.Lock() + st.perTenant = make(map[string]*Tenant) + st.Unlock() +} From 7b891449e759c11f5be0ed2f5b26ec2b34f3bf76 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Tue, 16 Jul 2024 22:32:23 -0300 Subject: [PATCH 45/52] Remove cmd/jaeger/internal/integration/receivers/storagereceiver/ (#5749) ## Which problem is this PR solving? - Dead code, we ended up not using this for v2 e2e tests ## Description of the changes - Remove whole package Signed-off-by: Yuri Shkuro --- .../receivers/storagereceiver/README.md | 23 -- .../receivers/storagereceiver/config.go | 20 -- .../receivers/storagereceiver/config_test.go | 66 ---- .../receivers/storagereceiver/factory.go | 36 --- .../receivers/storagereceiver/factory_test.go | 28 -- .../receivers/storagereceiver/package_test.go | 14 - .../receivers/storagereceiver/receiver.go | 141 --------- .../storagereceiver/receiver_test.go | 282 ------------------ .../storagereceiver/testdata/config.yaml | 6 - 9 files changed, 616 deletions(-) delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/README.md delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/config.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go delete mode 100644 cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/README.md b/cmd/jaeger/internal/integration/receivers/storagereceiver/README.md deleted file mode 100644 index 30931adaf0f..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Storage Receiver - -`storagereceiver` is a fake receiver that creates an artificial stream of traces by: - -- repeatedly querying one of Jaeger storage backends for all traces (by service). -- tracking new traces / spans and passing them to the next component in the pipeline. - -# Getting Started - -The following settings are required: - -- `trace_storage` (no default): name of a storage backend defined in `jaegerstorage` extension - -The following settings can be optionally configured: - -- `pull_interval` (default = 0s): The delay between each iteration of pulling traces. - -```yaml -receivers: - jaeger_storage_receiver: - trace_storage: external-storage - pull_interval: 0s -``` diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/config.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/config.go deleted file mode 100644 index e9319b8991d..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/config.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "time" - - "github.com/asaskevich/govalidator" -) - -type Config struct { - TraceStorage string `valid:"required" mapstructure:"trace_storage"` - PullInterval time.Duration `mapstructure:"pull_interval"` -} - -func (cfg *Config) Validate() error { - _, err := govalidator.ValidateStruct(cfg) - return err -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go deleted file mode 100644 index 98435b3e2cf..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/config_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "errors" - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -func TestLoadConfig(t *testing.T) { - t.Parallel() - - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - - tests := []struct { - id component.ID - expected component.Config - expectedErr error - }{ - { - id: component.NewIDWithName(componentType, ""), - expectedErr: errors.New("non zero value required"), - }, - { - id: component.NewIDWithName(componentType, "defaults"), - expected: &Config{ - TraceStorage: "storage", - PullInterval: 0, - }, - }, - { - id: component.NewIDWithName(componentType, "filled"), - expected: &Config{ - TraceStorage: "storage", - PullInterval: 2 * time.Second, - }, - }, - } - - for _, tt := range tests { - t.Run(tt.id.String(), func(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - sub, err := cm.Sub(tt.id.String()) - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(cfg)) - - if tt.expectedErr != nil { - require.ErrorContains(t, component.ValidateConfig(cfg), tt.expectedErr.Error()) - } else { - require.NoError(t, component.ValidateConfig(cfg)) - assert.Equal(t, tt.expected, cfg) - } - }) - } -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go deleted file mode 100644 index 09abc498e72..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/factory.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/receiver" -) - -// componentType is the name of this extension in configuration. -var componentType = component.MustNewType("jaeger_storage_receiver") - -// ID is the identifier of this extension. -var ID = component.NewID(componentType) - -func NewFactory() receiver.Factory { - return receiver.NewFactory( - componentType, - createDefaultConfig, - receiver.WithTraces(createTracesReceiver, component.StabilityLevelDevelopment), - ) -} - -func createDefaultConfig() component.Config { - return &Config{} -} - -func createTracesReceiver(_ context.Context, set receiver.Settings, config component.Config, nextConsumer consumer.Traces) (receiver.Traces, error) { - cfg := config.(*Config) - - return newTracesReceiver(cfg, set, nextConsumer) -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go deleted file mode 100644 index 8b94fa2304b..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/factory_test.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/receiver/receivertest" -) - -func TestCreateDefaultConfig(t *testing.T) { - cfg := createDefaultConfig().(*Config) - require.NotNil(t, cfg, "failed to create default config") - require.NoError(t, componenttest.CheckConfigStruct(cfg)) -} - -func TestCreateTracesReceiver(t *testing.T) { - cfg := createDefaultConfig().(*Config) - f := NewFactory() - r, err := f.CreateTracesReceiver(context.Background(), receivertest.NewNopSettings(), cfg, nil) - require.NoError(t, err) - assert.NotNil(t, r) -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go deleted file mode 100644 index 4dbecd011d3..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/package_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "testing" - - "github.com/jaegertracing/jaeger/pkg/testutils" -) - -func TestMain(m *testing.M) { - testutils.VerifyGoLeaks(m) -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go deleted file mode 100644 index d6f93ef5ccd..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "context" - "fmt" - "time" - - jaeger2otlp "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/receiver" - "go.uber.org/zap" - - "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" - "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/storage/spanstore" -) - -type storageReceiver struct { - cancelConsumeLoop context.CancelFunc - config *Config - settings receiver.Settings - consumedTraces map[model.TraceID]*consumedTrace - nextConsumer consumer.Traces - spanReader spanstore.Reader -} - -type consumedTrace struct { - spanIDs map[model.SpanID]struct{} -} - -func newTracesReceiver(config *Config, set receiver.Settings, nextConsumer consumer.Traces) (*storageReceiver, error) { - return &storageReceiver{ - config: config, - settings: set, - consumedTraces: make(map[model.TraceID]*consumedTrace), - nextConsumer: nextConsumer, - }, nil -} - -func (r *storageReceiver) Start(ctx context.Context, host component.Host) error { - f, err := jaegerstorage.GetStorageFactory(r.config.TraceStorage, host) - if err != nil { - return fmt.Errorf("cannot find storage factory: %w", err) - } - - if r.spanReader, err = f.CreateSpanReader(); err != nil { - return fmt.Errorf("cannot create span reader: %w", err) - } - - ctx, cancel := context.WithCancel(ctx) - r.cancelConsumeLoop = cancel - - go func() { - if err := r.consumeLoop(ctx); err != nil { - r.settings.ReportStatus(component.NewFatalErrorEvent(err)) - } - }() - - return nil -} - -func (r *storageReceiver) consumeLoop(ctx context.Context) error { - for { - services, err := r.spanReader.GetServices(ctx) - if err != nil { - r.settings.Logger.Error("Failed to get services from consumer", zap.Error(err)) - return err - } - - for _, svc := range services { - if err := r.consumeTraces(ctx, svc); err != nil { - r.settings.Logger.Error("Failed to consume traces from consumer", zap.Error(err)) - } - } - - select { - case <-ctx.Done(): - r.settings.Logger.Info("Consumer stopped") - return nil - default: - time.Sleep(r.config.PullInterval) - } - } -} - -func (r *storageReceiver) consumeTraces(ctx context.Context, serviceName string) error { - endTime := time.Now() - traces, err := r.spanReader.FindTraces(ctx, &spanstore.TraceQueryParameters{ - ServiceName: serviceName, - StartTimeMin: endTime.Add(-1 * time.Hour), - StartTimeMax: endTime, - }) - if err != nil { - return err - } - - for _, trace := range traces { - traceID := trace.Spans[0].TraceID - if _, ok := r.consumedTraces[traceID]; !ok { - r.consumedTraces[traceID] = &consumedTrace{ - spanIDs: make(map[model.SpanID]struct{}), - } - } - r.consumeSpans(ctx, r.consumedTraces[traceID], trace.Spans) - } - - return nil -} - -func (r *storageReceiver) consumeSpans(ctx context.Context, tc *consumedTrace, spans []*model.Span) error { - // Spans are consumed one at a time because we don't know whether all spans - // in a trace have been completely exported - for _, span := range spans { - if _, ok := tc.spanIDs[span.SpanID]; !ok { - tc.spanIDs[span.SpanID] = struct{}{} - td, err := jaeger2otlp.ProtoToTraces([]*model.Batch{ - { - Spans: []*model.Span{span}, - Process: span.Process, - }, - }) - if err != nil { - return err - } - r.nextConsumer.ConsumeTraces(ctx, td) - } - } - - return nil -} - -func (r *storageReceiver) Shutdown(_ context.Context) error { - if r.cancelConsumeLoop != nil { - r.cancelConsumeLoop() - } - return nil -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go b/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go deleted file mode 100644 index 794cfdbbfd2..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2024 The Jaeger Authors. -// SPDX-License-Identifier: Apache-2.0 - -package storagereceiver - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" - jaeger2otlp "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/pdata/ptrace" - "go.opentelemetry.io/collector/receiver/receivertest" - - "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage" - "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/storage" - factoryMocks "github.com/jaegertracing/jaeger/storage/mocks" - spanStoreMocks "github.com/jaegertracing/jaeger/storage/spanstore/mocks" -) - -var _ jaegerstorage.Extension = (*mockStorageExt)(nil) - -type mockStorageExt struct { - name string - factory *factoryMocks.Factory -} - -func (*mockStorageExt) Start(context.Context, component.Host) error { - panic("not implemented") -} - -func (*mockStorageExt) Shutdown(context.Context) error { - panic("not implemented") -} - -func (m *mockStorageExt) Factory(name string) (storage.Factory, bool) { - if m.name == name { - return m.factory, true - } - return nil, false -} - -type receiverTest struct { - storageName string - receiveName string - receiveInterval time.Duration - reportStatus func(*component.StatusEvent) - - reader *spanStoreMocks.Reader - factory *factoryMocks.Factory - host *storagetest.StorageHost - receiver *storageReceiver -} - -func withReceiver( - r *receiverTest, - fn func(r *receiverTest), -) { - reader := new(spanStoreMocks.Reader) - factory := new(factoryMocks.Factory) - host := storagetest.NewStorageHost() - host.WithExtension(jaegerstorage.ID, &mockStorageExt{ - name: r.storageName, - factory: factory, - }) - cfg := createDefaultConfig().(*Config) - cfg.TraceStorage = r.receiveName - cfg.PullInterval = r.receiveInterval - receiver, _ := newTracesReceiver( - cfg, - receivertest.NewNopSettings(), - consumertest.NewNop(), - ) - receiver.settings.ReportStatus = func(_ *component.StatusEvent) {} - - r.reader = reader - r.factory = factory - r.host = host - r.receiver = receiver - fn(r) -} - -var ( - services = []string{"example-service-1", "example-service-2"} - spans = []*model.Span{ - { - TraceID: model.NewTraceID(0, 1), - SpanID: model.NewSpanID(1), - Process: &model.Process{ - ServiceName: services[0], - }, - }, - { - TraceID: model.NewTraceID(0, 1), - SpanID: model.NewSpanID(2), - Process: &model.Process{ - ServiceName: services[0], - }, - }, - { - TraceID: model.NewTraceID(0, 2), - SpanID: model.NewSpanID(3), - Process: &model.Process{ - ServiceName: services[1], - }, - }, - { - TraceID: model.NewTraceID(0, 2), - SpanID: model.NewSpanID(4), - Process: &model.Process{ - ServiceName: services[1], - }, - }, - } -) - -func TestReceiver_NoStorageError(t *testing.T) { - r := &receiverTest{ - storageName: "", - receiveName: "foo", - } - withReceiver(r, func(r *receiverTest) { - err := r.receiver.Start(context.Background(), r.host) - require.ErrorContains(t, err, "cannot find storage factory") - }) -} - -func TestReceiver_CreateSpanReaderError(t *testing.T) { - r := &receiverTest{ - storageName: "foo", - receiveName: "foo", - } - withReceiver(r, func(r *receiverTest) { - r.factory.On("CreateSpanReader").Return(nil, errors.New("mocked error")) - - err := r.receiver.Start(context.Background(), r.host) - require.ErrorContains(t, err, "cannot create span reader") - }) -} - -func TestReceiver_GetServiceError(t *testing.T) { - r := &receiverTest{ - storageName: "external-storage", - receiveName: "external-storage", - } - withReceiver(r, func(r *receiverTest) { - r.reader.On("GetServices", mock.AnythingOfType("*context.cancelCtx")).Return([]string{}, errors.New("mocked error")) - r.factory.On("CreateSpanReader").Return(r.reader, nil) - r.receiver.spanReader = r.reader - r.reportStatus = func(se *component.StatusEvent) { - require.ErrorContains(t, se.Err(), "mocked error") - } - - require.NoError(t, r.receiver.Start(context.Background(), r.host)) - }) -} - -func TestReceiver_Shutdown(t *testing.T) { - withReceiver(&receiverTest{}, func(r *receiverTest) { - require.NoError(t, r.receiver.Shutdown(context.Background())) - }) -} - -func TestReceiver_Start(t *testing.T) { - r := &receiverTest{ - storageName: "external-storage", - receiveName: "external-storage", - receiveInterval: 50 * time.Millisecond, - } - withReceiver(r, func(r *receiverTest) { - r.reader.On("GetServices", mock.AnythingOfType("*context.cancelCtx")).Return([]string{}, nil) - r.factory.On("CreateSpanReader").Return(r.reader, nil) - - require.NoError(t, r.receiver.Start(context.Background(), r.host)) - // let the consumeLoop to reach the end of iteration and sleep - time.Sleep(100 * time.Millisecond) - require.NoError(t, r.receiver.Shutdown(context.Background())) - }) -} - -func TestReceiver_StartConsume(t *testing.T) { - tests := []struct { - name string - services []string - traces []*model.Trace - tracesErr error - expectedTraces []*model.Trace - }{ - { - name: "empty service", - }, - { - name: "find traces error", - services: []string{"example-service"}, - tracesErr: errors.New("failed to find traces"), - }, - { - name: "consume first trace", - services: []string{services[0]}, - traces: []*model.Trace{ - {Spans: []*model.Span{spans[0]}}, - }, - expectedTraces: []*model.Trace{ - {Spans: []*model.Span{spans[0]}}, - }, - }, - { - name: "consume second trace", - services: services, - traces: []*model.Trace{ - {Spans: []*model.Span{spans[0]}}, - {Spans: []*model.Span{spans[2], spans[3]}}, - }, - expectedTraces: []*model.Trace{ - {Spans: []*model.Span{spans[0]}}, - {Spans: []*model.Span{spans[2]}}, - {Spans: []*model.Span{spans[3]}}, - }, - }, - { - name: "re-consume first trace with new spans", - services: services, - traces: []*model.Trace{ - {Spans: []*model.Span{spans[0], spans[1]}}, - {Spans: []*model.Span{spans[2], spans[3]}}, - }, - expectedTraces: []*model.Trace{ - {Spans: []*model.Span{spans[0]}}, - {Spans: []*model.Span{spans[2]}}, - {Spans: []*model.Span{spans[3]}}, - // span at index 1 is consumed last - {Spans: []*model.Span{spans[1]}}, - }, - }, - } - - withReceiver(&receiverTest{}, func(r *receiverTest) { - sink := &consumertest.TracesSink{} - r.receiver.nextConsumer = sink - - ctx, cancelFunc := context.WithCancel(context.Background()) - r.receiver.cancelConsumeLoop = cancelFunc - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - reader := new(spanStoreMocks.Reader) - reader.On("GetServices", mock.AnythingOfType("*context.cancelCtx")).Return(test.services, nil) - reader.On( - "FindTraces", - mock.AnythingOfType("*context.cancelCtx"), - mock.AnythingOfType("*spanstore.TraceQueryParameters"), - ).Return(test.traces, test.tracesErr) - r.receiver.spanReader = reader - - require.NoError(t, r.receiver.Shutdown(ctx)) - require.NoError(t, r.receiver.consumeLoop(ctx)) - - expectedTraces := make([]ptrace.Traces, 0) - for _, trace := range test.expectedTraces { - td, err := jaeger2otlp.ProtoToTraces([]*model.Batch{ - { - Spans: []*model.Span{trace.Spans[0]}, - Process: trace.Spans[0].Process, - }, - }) - require.NoError(t, err) - expectedTraces = append(expectedTraces, td) - } - actualTraces := sink.AllTraces() - assert.Equal(t, expectedTraces, actualTraces) - }) - } - }) -} diff --git a/cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml b/cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml deleted file mode 100644 index e590e8f1694..00000000000 --- a/cmd/jaeger/internal/integration/receivers/storagereceiver/testdata/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -jaeger_storage_receiver: -jaeger_storage_receiver/defaults: - trace_storage: storage -jaeger_storage_receiver/filled: - trace_storage: storage - pull_interval: 2s From c19d38569fc08e9c164d7f3fbf877b62ac8ad2f2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 17 Jul 2024 03:34:17 +0200 Subject: [PATCH 46/52] Update All OTEL Collector packages (#5754) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/collector/component](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fcomponent/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configauth](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigauth/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configgrpc](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfiggrpc/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/confighttp](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfighttp/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/confignet](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfignet/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfignet/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfignet/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfignet/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/config/configretry](https://togithub.com/open-telemetry/opentelemetry-collector) | `v1.11.0` -> `v1.12.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigretry/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigretry/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigretry/v1.11.0/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfig%2fconfigretry/v1.11.0/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/converter/expandconverter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fconverter%2fexpandconverter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/envprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fenvprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/fileprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2ffileprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/httpprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/httpsprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fhttpsprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/confmap/provider/yamlprovider](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconfmap%2fprovider%2fyamlprovider/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/connector](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/connector/forwardconnector](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconnector%2fforwardconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/consumer](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fconsumer/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/debugexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fdebugexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/otlpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlpexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/exporter/otlphttpexporter](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fexporter%2fotlphttpexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension/ballastextension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension%2fballastextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/extension/zpagesextension](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fextension%2fzpagesextension/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/otelcol](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fotelcol/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/pdata](https://togithub.com/open-telemetry/opentelemetry-collector) | `v1.11.0` -> `v1.12.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fpdata/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fpdata/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fpdata/v1.11.0/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fpdata/v1.11.0/v1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor/batchprocessor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor%2fbatchprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/processor/memorylimiterprocessor](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2fprocessor%2fmemorylimiterprocessor/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [go.opentelemetry.io/collector/receiver/otlpreceiver](https://togithub.com/open-telemetry/opentelemetry-collector) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fcollector%2freceiver%2fotlpreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/component) ### [`v0.105.0`](https://togithub.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1120v01050) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector/compare/v0.104.0...v0.105.0) ##### πŸ›‘ Breaking changes πŸ›‘ - `service`: add `service.disableOpenCensusBridge` feature gate which is enabled by default to remove the dependency on OpenCensus ([#​10414](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10414)) - `confmap`: Promote `confmap.strictlyTypedInput` feature gate to beta. ([#​10552](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10552)) This feature gate changes the following: - Configurations relying on the implicit type casting behaviors listed on [#​9532](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9532) will start to fail. - Configurations using URI expansion (i.e. `field: ${env:ENV}`) for string-typed fields will use the value passed in `ENV` verbatim without intermediate type casting. ##### πŸ’‘ Enhancements πŸ’‘ - `configtls`: Mark module as stable. ([#​9377](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9377)) - `confmap`: Remove extra closing parenthesis in sub-config error ([#​10480](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10480)) - `configgrpc`: Update the default load balancer strategy to round_robin ([#​10319](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10319)) To restore the behavior that was previously the default, set `balancer_name` to `pick_first`. - `cmd/builder`: Add go module info the builder generated code. ([#​10570](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10570)) - `otelcol`: Add go module to components subcommand. ([#​10570](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10570)) - `confmap`: Add explanation to errors related to `confmap.strictlyTypedInput` feature gate. ([#​9532](https://togithub.com/open-telemetry/opentelemetry-collector/issues/9532)) - `confmap`: Allow using `map[string]any` values in string interpolation ([#​10605](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10605)) ##### 🧰 Bug fixes 🧰 - `builder`: provide context when a module in the config is missing its gomod value ([#​10474](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10474)) - `confmap`: Fixes issue where confmap could not escape `$$` when `confmap.unifyEnvVarExpansion` is enabled. ([#​10560](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10560)) - `mdatagen`: fix generated comp test for extensions and unused imports in templates ([#​10477](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10477)) - `otlpreceiver`: Fixes a bug where the otlp receiver's http response was not properly translating grpc error codes to http status codes. ([#​10574](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10574)) - `exporterhelper`: Fix incorrect deduplication of otelcol_exporter_queue_size and otelcol_exporter_queue_capacity metrics if multiple exporters are used. ([#​10444](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10444)) - `service/telemetry`: Add ability to set service.name for spans emitted by the Collector ([#​10489](https://togithub.com/open-telemetry/opentelemetry-collector/issues/10489)) - `internal/localhostgate`: Correctly log info message when `component.UseLocalHostAsDefaultHost` is enabled ([#​8510](https://togithub.com/open-telemetry/opentelemetry-collector/issues/8510))
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ‘» **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 106 +++++++++++++++-------------- go.sum | 212 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 165 insertions(+), 153 deletions(-) diff --git a/go.mod b/go.mod index 7a481f11851..799ffa645fb 100644 --- a/go.mod +++ b/go.mod @@ -40,35 +40,35 @@ require ( github.com/stretchr/testify v1.9.0 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/xdg-go/scram v1.1.2 - go.opentelemetry.io/collector/component v0.104.0 - go.opentelemetry.io/collector/config/configauth v0.104.0 - go.opentelemetry.io/collector/config/configgrpc v0.104.0 - go.opentelemetry.io/collector/config/confighttp v0.104.0 - go.opentelemetry.io/collector/config/configretry v1.11.0 - go.opentelemetry.io/collector/config/configtls v0.104.0 - go.opentelemetry.io/collector/confmap v0.104.0 - go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0 - go.opentelemetry.io/collector/connector v0.104.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.104.0 - go.opentelemetry.io/collector/consumer v0.104.0 - go.opentelemetry.io/collector/exporter v0.104.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 - go.opentelemetry.io/collector/extension v0.104.0 - go.opentelemetry.io/collector/extension/ballastextension v0.104.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.104.0 - go.opentelemetry.io/collector/otelcol v0.104.0 - go.opentelemetry.io/collector/pdata v1.11.0 - go.opentelemetry.io/collector/processor v0.104.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.104.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0 - go.opentelemetry.io/collector/receiver v0.104.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 + go.opentelemetry.io/collector/component v0.105.0 + go.opentelemetry.io/collector/config/configauth v0.105.0 + go.opentelemetry.io/collector/config/configgrpc v0.105.0 + go.opentelemetry.io/collector/config/confighttp v0.105.0 + go.opentelemetry.io/collector/config/configretry v1.12.0 + go.opentelemetry.io/collector/config/configtls v1.12.0 + go.opentelemetry.io/collector/confmap v0.105.0 + go.opentelemetry.io/collector/confmap/converter/expandconverter v0.105.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v0.105.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.105.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.105.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.105.0 + go.opentelemetry.io/collector/connector v0.105.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.105.0 + go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/exporter v0.105.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.105.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.105.0 + go.opentelemetry.io/collector/extension v0.105.0 + go.opentelemetry.io/collector/extension/ballastextension v0.105.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.105.0 + go.opentelemetry.io/collector/otelcol v0.105.0 + go.opentelemetry.io/collector/pdata v1.12.0 + go.opentelemetry.io/collector/processor v0.105.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.105.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.105.0 + go.opentelemetry.io/collector/receiver v0.105.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.105.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0 @@ -93,8 +93,12 @@ require ( ) require ( - go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.105.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect + go.opentelemetry.io/otel/log v0.4.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.4.0 // indirect ) require ( @@ -176,11 +180,11 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/relvacode/iso8601 v1.4.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/cors v1.10.1 // indirect + github.com/rs/cors v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/shirou/gopsutil/v4 v4.24.5 // indirect + github.com/shirou/gopsutil/v4 v4.24.6 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -195,24 +199,24 @@ require ( github.com/xdg-go/stringprep v1.0.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.104.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.11.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.104.0 - go.opentelemetry.io/collector/config/configopaque v1.11.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect - go.opentelemetry.io/collector/config/internal v0.104.0 // indirect - go.opentelemetry.io/collector/exporter/debugexporter v0.104.0 - go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect - go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/semconv v0.104.0 // indirect - go.opentelemetry.io/collector/service v0.104.0 // indirect - go.opentelemetry.io/contrib/config v0.7.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.27.0 // indirect - go.opentelemetry.io/contrib/zpages v0.52.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 // indirect + go.opentelemetry.io/collector v0.105.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.12.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.105.0 + go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/exporter/debugexporter v0.105.0 + go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect + go.opentelemetry.io/collector/featuregate v1.12.0 // indirect + go.opentelemetry.io/collector/semconv v0.105.0 // indirect + go.opentelemetry.io/collector/service v0.105.0 // indirect + go.opentelemetry.io/contrib/config v0.8.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect + go.opentelemetry.io/contrib/zpages v0.53.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/go.sum b/go.sum index 1fef2584e96..c39f43ff89c 100644 --- a/go.sum +++ b/go.sum @@ -321,8 +321,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= +github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -330,8 +330,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/shirou/gopsutil/v4 v4.24.5 h1:gGsArG5K6vmsh5hcFOHaPm87UD003CaDMkAOweSQjhM= -github.com/shirou/gopsutil/v4 v4.24.5/go.mod h1:aoebb2vxetJ/yIDZISmduFvVNPHqXQ9SEJwRXxkf0RA= +github.com/shirou/gopsutil/v4 v4.24.6 h1:9qqCSYF2pgOU+t+NgJtp7Co5+5mHF/HyKBUckySQL64= +github.com/shirou/gopsutil/v4 v4.24.6/go.mod h1:aoebb2vxetJ/yIDZISmduFvVNPHqXQ9SEJwRXxkf0RA= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -397,110 +397,114 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.104.0 h1:R3zjM4O3K3+ttzsjPV75P80xalxRbwYTURlK0ys7uyo= -go.opentelemetry.io/collector v0.104.0/go.mod h1:Tm6F3na9ajnOm6I5goU9dURKxq1fSBK1yA94nvUix3k= -go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= -go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= -go.opentelemetry.io/collector/config/configauth v0.104.0 h1:ULtjugImijpKuLgGVt0E0HwiZT7+uDUEtMquh1ODB24= -go.opentelemetry.io/collector/config/configauth v0.104.0/go.mod h1:Til+nLLrQwwhgmfcGTX4ZRcNuMhdaWhBW1jH9DLTabQ= -go.opentelemetry.io/collector/config/configcompression v1.11.0 h1:oTwbcLh7mWHSDUIZXkRJVdNAMoBGS39XF68goTMOQq8= -go.opentelemetry.io/collector/config/configcompression v1.11.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= -go.opentelemetry.io/collector/config/configgrpc v0.104.0 h1:E3RtqryQPOm/trJmhlJZj6cCqJNKgv9fOEQvSEpzsFM= -go.opentelemetry.io/collector/config/configgrpc v0.104.0/go.mod h1:tu3ifnJ5pv+4rZcaqNWfvVLjNKb8icSPoClN3THN8PU= -go.opentelemetry.io/collector/config/confighttp v0.104.0 h1:KSY0FSHSjuPyrR6iA2g5oFTozYFpYcy0ssJny8gTNTQ= -go.opentelemetry.io/collector/config/confighttp v0.104.0/go.mod h1:YgSXwuMYHANzzv+IBjHXaBMG/4G2mrseIpICHj+LB3U= -go.opentelemetry.io/collector/config/confignet v0.104.0 h1:i7AOTJf4EQox3SEt1YtQFQR+BwXr3v5D9x3Ai9/ovy8= -go.opentelemetry.io/collector/config/confignet v0.104.0/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= -go.opentelemetry.io/collector/config/configopaque v1.11.0 h1:Pt06PXWVmRaiSX63mzwT8Z9SV/hOc6VHNZbfZ10YY4o= -go.opentelemetry.io/collector/config/configopaque v1.11.0/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= -go.opentelemetry.io/collector/config/configretry v1.11.0 h1:UdEDD0ThxPU7+n2EiKJxVTvDCGygXu9hTfT6LOQv9DY= -go.opentelemetry.io/collector/config/configretry v1.11.0/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/config/configtls v0.104.0 h1:bMmLz2+r+REpO7cDOR+srOJHfitqTZfSZCffDpKfwWk= -go.opentelemetry.io/collector/config/configtls v0.104.0/go.mod h1:e33o7TWcKfe4ToLFyGISEPGMgp6ezf3yHRGY4gs9nKk= -go.opentelemetry.io/collector/config/internal v0.104.0 h1:h3OkxTfXWWrHRyPEGMpJb4fH+54puSBuzm6GQbuEZ2o= -go.opentelemetry.io/collector/config/internal v0.104.0/go.mod h1:KjH43jsAUFyZPeTOz7GrPORMQCK13wRMCyQpWk99gMo= -go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= -go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= -go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0 h1:7BhJk71V8xhm8wUpuHG4CVRAPu8JajKj8VmGZ6zS7SA= -go.opentelemetry.io/collector/confmap/converter/expandconverter v0.104.0/go.mod h1:o2xTZJpc65SyYPOAGOjyvWwQEqYSWT4Q4/gMfOYpAzc= -go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0 h1:/3iSlUHH1Q3xeZc55oVekd4dibXzqgphXZI7EaYJ+ak= -go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0/go.mod h1:RZDXvP81JwvIGeq3rvDBrRKMUfn2BeKCmppHm4Qm0D8= -go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 h1:B+nMVlIUQxuP52CZSegGuA2z9S+Cv2XwFb2a/TLFPhc= -go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0/go.mod h1:O0RcaP/I/kn7JHrwohUfj6AwvQYLxjbqg/HnjkvLLTw= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0 h1:6UreSAu64Ft3VfKWE3sjcmf+mWMyWemSsrjS/fjRPpQ= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.104.0/go.mod h1:+vP6R5i9h+oYJNjp4bQHvtSHEu1t+CgSKIeZYZZRQXA= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0 h1:y07I19lmp9VHZ58PJ3nwwd1wqumnIBeMxTNBSh/Vn6k= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.104.0/go.mod h1:WV1HOa0z3Ln5ZkwEW7Cm2pCHkfzYY9kBe0dLy8DqeYA= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0 h1:itBGhyEbX+iz8kz3nc4PYxQx4bL7y87xXNUcGnbKPuY= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.104.0/go.mod h1:iPVsTBkRFHZ21UEfSGWk8c4maOzTp6BWWpTk+l6PjJI= -go.opentelemetry.io/collector/connector v0.104.0 h1:Y82ytwZZ+EruWafEebO0dgWMH+TdkcSONEqZ5bm9JYA= -go.opentelemetry.io/collector/connector v0.104.0/go.mod h1:78SEHel3B3taFnSBg/syW4OV9aU1Ec9KjgbgHf/L8JA= -go.opentelemetry.io/collector/connector/forwardconnector v0.104.0 h1:35tTQfTDb+baDcP1F/wdm/mV7CyMKaOx5un4QWEHYRk= -go.opentelemetry.io/collector/connector/forwardconnector v0.104.0/go.mod h1:N5wZtusSfyIUK1qgbfQ+i6y26rFDTvD4QWJHNMnjLQM= -go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= -go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= -go.opentelemetry.io/collector/exporter v0.104.0 h1:C2HmnfBa05IQ2T+p9T7K7gXVxjrBLd+JxEtAWo7JNbg= -go.opentelemetry.io/collector/exporter v0.104.0/go.mod h1:Rx0oB0E4Ccg1JuAnEWwhtrq1ygRBkfx4mco1DpR3WaQ= -go.opentelemetry.io/collector/exporter/debugexporter v0.104.0 h1:1Z63H/xxv6IzMP7GPmI6v/lQAqZwYZCVC0rWYcYOomw= -go.opentelemetry.io/collector/exporter/debugexporter v0.104.0/go.mod h1:NHVzTM0Z/bomgR7SAe3ysx4CZzh2UJ3TXWSCnaOB1Wo= -go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 h1:EFOdhnc2yGhqou0Tud1HsM7fsgWo/H3tdQhYYytDprQ= -go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0/go.mod h1:fAF7Q3Xh0OkxYWUycdrNNDXkyz3nhHIRKDkez0aQ6zg= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 h1:JkNCOj7DdyJhcYIaRqtS/X+YtAPRjE4pcruyY6LoM7c= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0/go.mod h1:6rs4Xugs7tIC3IFbAC+fj56zLiVc7osXC5UTjk/Mkw4= -go.opentelemetry.io/collector/extension v0.104.0 h1:bftkgFMKya/QIwK+bOxEAPVs/TvTez+s1mlaiUznJkA= -go.opentelemetry.io/collector/extension v0.104.0/go.mod h1:x7K0KyM1JGrtLbafEbRoVp0VpGBHpyx9hu87bsja6S4= -go.opentelemetry.io/collector/extension/auth v0.104.0 h1:SelhccGCrqLThPlkbv6lbAowHsjgOTAWcAPz085IEC4= -go.opentelemetry.io/collector/extension/auth v0.104.0/go.mod h1:s3/C7LTSfa91QK0JPMTRIvH/gCv+a4DGiiNeTAX9OhI= -go.opentelemetry.io/collector/extension/ballastextension v0.104.0 h1:5GESICl2J7jBQ6O8dGHuv077ptoIwhwMiF0zEAfcHcU= -go.opentelemetry.io/collector/extension/ballastextension v0.104.0/go.mod h1:TYZBh3PK6fPzTS/2LOklyn/7Lv79k7/WfOsQrlT9cQQ= -go.opentelemetry.io/collector/extension/zpagesextension v0.104.0 h1:rJ9Sw6DR27s6bW7lWBjJhjth5CXpltAHBKIgUFgVwFs= -go.opentelemetry.io/collector/extension/zpagesextension v0.104.0/go.mod h1:85Exj8r237PIvaXL1a/S0KeVNnm3kQNpVXtu0O2Zk5k= -go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= -go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/otelcol v0.104.0 h1:RnMx7RaSFmX4dq/l3wbXWwcUnFK7RU19AM/0FbMr0Ig= -go.opentelemetry.io/collector/otelcol v0.104.0/go.mod h1:hWFRiHIKT3zbUx6SRevusPRa6mfm+70bPG5CK0glqSU= -go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= -go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= -go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= -go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= -go.opentelemetry.io/collector/processor v0.104.0 h1:KSvMDu4DWmK1/k2z2rOzMtTvAa00jnTabtPEK9WOSYI= -go.opentelemetry.io/collector/processor v0.104.0/go.mod h1:qU2/xCCYdvVORkN6aq0H/WUWkvo505VGYg2eOwPvaTg= -go.opentelemetry.io/collector/processor/batchprocessor v0.104.0 h1:6xXvHYkPjwM1zdzliDM2H/omTGgIOkY96JTCln7CFZQ= -go.opentelemetry.io/collector/processor/batchprocessor v0.104.0/go.mod h1:f1VfVdiOlqtJDAvQy8YONEee19nJ3haxNeiMPy59w8M= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0 h1:bfxUNxP2i41Dpdp5cXwVuh4ZIQ8g6e4NDnu5HakWQw4= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.104.0/go.mod h1:2HtP0f+EBu99Uq07JF20fa2FKAsjnIieOZ4f9Jysfpc= -go.opentelemetry.io/collector/receiver v0.104.0 h1:URL1ExkYYd+qbndm7CdGvI2mxzsv/pNfmwJ+1QSQ9/o= -go.opentelemetry.io/collector/receiver v0.104.0/go.mod h1:+enTCZQLf6dRRANWvykXEzrlRw2JDppXJtoYWd/Dd54= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0 h1:t9cACuSc7kY09guws7VyB/z9QnG7/zWLC1NQ29WH4+o= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.104.0/go.mod h1:sPIIO4F6uit1i/XQgfe2WryvdO5Hr16bQgZTaXcR8mM= -go.opentelemetry.io/collector/semconv v0.104.0 h1:dUvajnh+AYJLEW/XOPk0T0BlwltSdi3vrjO7nSOos3k= -go.opentelemetry.io/collector/semconv v0.104.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= -go.opentelemetry.io/collector/service v0.104.0 h1:DTpkoX4C6qiA3v3cfB2cHv/cH705o5JI9J3P77SFUrE= -go.opentelemetry.io/collector/service v0.104.0/go.mod h1:eq68zgpqRDYaVp60NeRu973J0rA5vZJkezfw/EzxLXc= -go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= -go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/collector v0.105.0 h1:Qw/ONVMPT3aD8HjdDRcXCGoZrtSWH3jx4BkwAN1yrEM= +go.opentelemetry.io/collector v0.105.0/go.mod h1:UVapTqB4fJeZpGU/YgOo6665cxCSytqYmMkVmRlu2cg= +go.opentelemetry.io/collector/component v0.105.0 h1:/OdkWHd1xTNX7JRq9iW3AFoJAnYUOGZZyOprNQkGoTI= +go.opentelemetry.io/collector/component v0.105.0/go.mod h1:s8KoxOrhNIBzetkb0LHmzX1OI67DyZbaaUPOWIXS1mg= +go.opentelemetry.io/collector/config/configauth v0.105.0 h1:9Pa65Ay4kdmMsp5mg+/791GvCYy1hHOroIlKBiJzlps= +go.opentelemetry.io/collector/config/configauth v0.105.0/go.mod h1:iL62YzyFCNr1Se0EDYaQ792CFCBiFivSbTWekd4g1VE= +go.opentelemetry.io/collector/config/configcompression v1.12.0 h1:RxqSDVZPJyL7I3v+gdVDvnJ/9tV0ZWgraRDX/gaddfA= +go.opentelemetry.io/collector/config/configcompression v1.12.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= +go.opentelemetry.io/collector/config/configgrpc v0.105.0 h1:3IbN6+5c42Bp6CGPKoXZ7QkkQpRxnV01KRse6oD+bd0= +go.opentelemetry.io/collector/config/configgrpc v0.105.0/go.mod h1:wrFPXVXk4so7yYisuPeebZtU6ECzG5aXOYNdfyoHSnI= +go.opentelemetry.io/collector/config/confighttp v0.105.0 h1:0sVdNFuLikgDhxdp+mrbSrYzovwRxZDVIhv9ZQ0X5e4= +go.opentelemetry.io/collector/config/confighttp v0.105.0/go.mod h1:1JMvF8ocjlNxwrVIUJHy9wTEW/nlKs1LLPlTSg4D044= +go.opentelemetry.io/collector/config/confignet v0.105.0 h1:O8kenkWnLPemp2XXVOqFv6OQd9wsnOvBUvl3OlJGPKI= +go.opentelemetry.io/collector/config/confignet v0.105.0/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= +go.opentelemetry.io/collector/config/configopaque v1.12.0 h1:aIsp9NdcLZSiG4YDoFPGXhmma03Tk+6e89+n8GtU/Mc= +go.opentelemetry.io/collector/config/configopaque v1.12.0/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= +go.opentelemetry.io/collector/config/configretry v1.12.0 h1:tEBwueO4AIkwWosxz6NWqnghdZ7y5SfHcIzLrvh6kB8= +go.opentelemetry.io/collector/config/configretry v1.12.0/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= +go.opentelemetry.io/collector/config/configtelemetry v0.105.0 h1:wEfUxAjjstp47aLr2s1cMZiH0dt+k42m6VC6HigqgJA= +go.opentelemetry.io/collector/config/configtelemetry v0.105.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/config/configtls v1.12.0 h1:Px0+GE4LE/9sXMgkwBb5g8QHWvnrnuRg9BLSa+QtxgM= +go.opentelemetry.io/collector/config/configtls v1.12.0/go.mod h1:aeCGPlvrWhc+EySpIKdelPAj4l9wXKzZPouQO3NIoTs= +go.opentelemetry.io/collector/config/internal v0.105.0 h1:PWnbeslkIGMjZzh5IJRjO6bA02d1Xrkjw2N60ixWzqQ= +go.opentelemetry.io/collector/config/internal v0.105.0/go.mod h1:+Y5vRJ+lio2uuYlVPfy9AZVrip9Y0B9PiUA5Vz7lzZw= +go.opentelemetry.io/collector/confmap v0.105.0 h1:3NP2BbUju42rjeQvRbmpCJGJGvbiV3WnGyXsVmocimo= +go.opentelemetry.io/collector/confmap v0.105.0/go.mod h1:Oj1xUBRvAuL8OWWMj9sSYf1uQpB+AErpj+FKGUQLBI0= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.105.0 h1:1c81AJg+WP+dGoAEftmc0KF5RK0mh4bxIFlU902CnFI= +go.opentelemetry.io/collector/confmap/converter/expandconverter v0.105.0/go.mod h1:ImkfsdJToeP3ZZ5ZVmQUdaKEueVHiZbwrQGyoDx/EiM= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.105.0 h1:r+5ZxhDLYqd6klLky3gtgWHgG5L2LX6o6VIvaLG39Gs= +go.opentelemetry.io/collector/confmap/provider/envprovider v0.105.0/go.mod h1:Srzkp9izW29pJtwoVtpL+bAN5ibtv+fyLg9JWZzCCi8= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0 h1:RgQwEbJgx+BihDt8yhiqmEi8IjQYFwbzsYRcTzvM7E4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0/go.mod h1:P7oT+6eaMv+ZyPSu6SEKalfR/UALdQgE3hq36b0Iww4= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.105.0 h1:hgzauRlEZId1AM00g3EHl4GaR4GLG23sdvmSRWQ9iFQ= +go.opentelemetry.io/collector/confmap/provider/httpprovider v0.105.0/go.mod h1:TqZbmLcG9GvLp76q45eE0EwiTHBmj4qRP32fI48DH5Q= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.105.0 h1:xQr2I7iQPDkFP/E2H9lg6jfAtpY1iz2oLGEFwa2FaeE= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.105.0/go.mod h1:UVTcdI8WhTXl8duc0EkeJU7nSQNptHwE6D/eqgeand0= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.105.0 h1:SAF6JFrjQ8YkFnggA5iiw9eKiBYDaO6ynK0Dl+vzIgw= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.105.0/go.mod h1:bWMg+SNk/PwEMiLWV0eCFNL4Er59aXsdDKq+2JzMOkE= +go.opentelemetry.io/collector/connector v0.105.0 h1:hmTsI6rnPAXsdVJ+wYrgeNTCrQzxzglU37qPlNSKTy0= +go.opentelemetry.io/collector/connector v0.105.0/go.mod h1:xQnq1Ygd/F4Kb93E0UsKus5YDINeyQ6GzCkxoujI9TE= +go.opentelemetry.io/collector/connector/forwardconnector v0.105.0 h1:e9gvf11xfijwraZLBf3IHXEk1YpXxMoJfqXarYo7ZNU= +go.opentelemetry.io/collector/connector/forwardconnector v0.105.0/go.mod h1:XIeSscBCAcpywFa7oVwTOpdHjRojS7No6Yz34YhFBp4= +go.opentelemetry.io/collector/consumer v0.105.0 h1:pO5Tspoz7yvEs81+904HfDjByP8Z7uuNk+7pOr3lRHM= +go.opentelemetry.io/collector/consumer v0.105.0/go.mod h1:tnaPDHUfKBJ01OnsJNRecniG9iciE+xHYLqamYwFQOQ= +go.opentelemetry.io/collector/exporter v0.105.0 h1:O2xmjfaRbkbpo3XkwEcnuBHCoXc5kS9CjYO8geu+3vo= +go.opentelemetry.io/collector/exporter v0.105.0/go.mod h1:5ulGEHRZyGbX4DWHJa2Br6Fr/W1Lay8ayf++1WrVvgk= +go.opentelemetry.io/collector/exporter/debugexporter v0.105.0 h1:Osqo7+pr1vZbt+12KMzZrst6uMv1r8UJZjTgI6vwqL4= +go.opentelemetry.io/collector/exporter/debugexporter v0.105.0/go.mod h1:rqjWoduh/qj6OlttzdbB8Ji6Vp4SoHJRnZHNuS/Mkp0= +go.opentelemetry.io/collector/exporter/otlpexporter v0.105.0 h1:JWAlh7A1oNm4LqUrrtPjAmUdvcE11VZCeJhMk0lShYg= +go.opentelemetry.io/collector/exporter/otlpexporter v0.105.0/go.mod h1:aA2E+t2giwUoJ2RmDw+2dVox64J2zHpTT2m/mi7zOIM= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.105.0 h1:ciJvNlC9ztoeyIi23TCpZ6PN7l75tl/yvKqBo0Cmajw= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.105.0/go.mod h1:e+PdCkQkP+1cj0+cijRfmE4/VjofxeeWoS1cvvu39HI= +go.opentelemetry.io/collector/extension v0.105.0 h1:R8i4HMvuSm20Nt3onyrLk19KKhjCNAsgS8FGh60rcZU= +go.opentelemetry.io/collector/extension v0.105.0/go.mod h1:oyX960URG27esNKitf3o2rqcBj0ajcx+dxkCxwRz34U= +go.opentelemetry.io/collector/extension/auth v0.105.0 h1:5gzRSHU0obVtZDzLLJQ/p4sIkacUsyEEpBiBRDs82Hk= +go.opentelemetry.io/collector/extension/auth v0.105.0/go.mod h1:zf45v7u1nKbdDHeMuhBVdSFwhbq2w9IWCbFKcDSkW5I= +go.opentelemetry.io/collector/extension/ballastextension v0.105.0 h1:JAihRR9cu35lGI6mGvxrwVcUHaPO7n++RaC4oouZics= +go.opentelemetry.io/collector/extension/ballastextension v0.105.0/go.mod h1:2PgAJVYhBDWv3gl/vZ6nblHoVQMrwWheKE+RjXFozdM= +go.opentelemetry.io/collector/extension/zpagesextension v0.105.0 h1:rD77+hMPaSuBOh8w6un+x0VI5oM2oAsSzAC9nKTNauE= +go.opentelemetry.io/collector/extension/zpagesextension v0.105.0/go.mod h1:vDuL/PBfZfHpOyF2XCJ/jWfHn/hu2pCE5KVRGCHOX+k= +go.opentelemetry.io/collector/featuregate v1.12.0 h1:l5WbV2vMQd2bL8ubfGrbKNtZaeJRckE12CTHvRe47Tw= +go.opentelemetry.io/collector/featuregate v1.12.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/internal/globalgates v0.105.0 h1:U/CwnTUXtrblD1sZ6ri7KWfYoTNjQd7GjJKrX/phRik= +go.opentelemetry.io/collector/internal/globalgates v0.105.0/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= +go.opentelemetry.io/collector/otelcol v0.105.0 h1:2YMp/OckEc4qEfIjx3pi7W7xr+nW03KdrdhHAt3NmYY= +go.opentelemetry.io/collector/otelcol v0.105.0/go.mod h1:SwdiOY/0szbyuJ1sDDv66W5nFPVkA9hOhQoEBAFbHA0= +go.opentelemetry.io/collector/pdata v1.12.0 h1:Xx5VK1p4VO0md8MWm2icwC1MnJ7f8EimKItMWw46BmA= +go.opentelemetry.io/collector/pdata v1.12.0/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= +go.opentelemetry.io/collector/pdata/pprofile v0.105.0 h1:C+Hd7CNcepL/364OBV9f4lHzJil2jQSOxcEM1PFXGDg= +go.opentelemetry.io/collector/pdata/pprofile v0.105.0/go.mod h1:chr7lMJIzyXkccnPRkIPhyXtqLZLSReZYhwsggOGEfg= +go.opentelemetry.io/collector/pdata/testdata v0.105.0 h1:5sPZzanR4nJR3sNQk3MTdArdEZCK0NRAfC29t0Dtf60= +go.opentelemetry.io/collector/pdata/testdata v0.105.0/go.mod h1:NIfgaclQp/M1BZhgyc/7hDWD+/DumC/OMBQVI2KW+N0= +go.opentelemetry.io/collector/processor v0.105.0 h1:LE6wEMWNa3h7eOJLMBm2lA0v6sc2j6Geqv1e3pIWS8Y= +go.opentelemetry.io/collector/processor v0.105.0/go.mod h1:QAvMEtd3k+YhRrnaEgs/8e0UueYonuT8Hg4udQOht60= +go.opentelemetry.io/collector/processor/batchprocessor v0.105.0 h1:j9f7EWmaR6kaQubKE0L3lvZxoIEppRyTAvqLDmp2Jig= +go.opentelemetry.io/collector/processor/batchprocessor v0.105.0/go.mod h1:klVt/0Egd7LSgWyxlSpgNvLMQRaqfUJg7Nv4qdpQOHA= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.105.0 h1:qPjFg7uWmsVvf0Kk11WzM6Zy//zNZFC5uFwYKFXlEn8= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.105.0/go.mod h1:0pgvBY04E2bRq5dY3Qfj66mKpkFnu252FNm7iiFEiAU= +go.opentelemetry.io/collector/receiver v0.105.0 h1:eZF97kMUnKJ20Uc4PaDlgLIGmaA8kyLqhH+vMXjh92U= +go.opentelemetry.io/collector/receiver v0.105.0/go.mod h1:nGKDXLUGVHxMBJ5QLfsJ/bIhGvoMGqsN0pZtD5SC8sE= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.105.0 h1:1qjnvrnDcEaj93WgyrWRWTTAGNODaxi98wNcXiHDwfM= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.105.0/go.mod h1:XGs9OAQQFDfVhSzruLcFNdzhTw2kbZZAV68iRE9ecGA= +go.opentelemetry.io/collector/semconv v0.105.0 h1:8p6dZ3JfxFTjbY38d8xlQGB1TQ3nPUvs+D0RERniZ1g= +go.opentelemetry.io/collector/semconv v0.105.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= +go.opentelemetry.io/collector/service v0.105.0 h1:93dqJVNKToEvYDYZO2pHrN8f6Uev4+xhzzmw4qwgAzE= +go.opentelemetry.io/collector/service v0.105.0/go.mod h1:H0fD5SZjV2AZTgHEjRhObnP8YrhG2etAh9rsWLtmimQ= +go.opentelemetry.io/contrib/config v0.8.0 h1:OD7aDMhL+2EpzdSHfkDmcdD/uUA+PgKM5faFyF9XFT0= +go.opentelemetry.io/contrib/config v0.8.0/go.mod h1:dGeVZWE//3wrxYHHP0iCBYJU1QmOmPcbV+FNB7pjDYI= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0 h1:IjgxbomVrV9za6bRi8fWCNXENs0co37SZedQilP2hm0= -go.opentelemetry.io/contrib/propagators/b3 v1.27.0/go.mod h1:Dv9obQz25lCisDvvs4dy28UPh974CxkahRDUPsY7y9E= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0 h1:XR6CFQrQ/ttAYmTBX2loUEFGdk1h17pxYI8828dk/1Y= +go.opentelemetry.io/contrib/propagators/b3 v1.28.0/go.mod h1:DWRkzJONLquRz7OJPh2rRbZ7MugQj62rk7g6HRnEqh0= go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0 h1:OYxqumWcd1yaV/qvCt1B7Sru9OeUNGjeXq/oldx3AGk= go.opentelemetry.io/contrib/samplers/jaegerremote v0.22.0/go.mod h1:2tZTRqCbvx7nG57wUwd5NQpNVujOWnR84iPLllIH0Ok= -go.opentelemetry.io/contrib/zpages v0.52.0 h1:MPgkMy0Cp3O5EdfVXP0ss3ujhEibysTM4eszx7E7d+E= -go.opentelemetry.io/contrib/zpages v0.52.0/go.mod h1:fqG5AFdoYru3A3DnhibVuaaEfQV2WKxE7fYE1jgDRwk= +go.opentelemetry.io/contrib/zpages v0.53.0 h1:hGgaJ3nrescxEk383gOBHA5gNfoquHs8oV/XcKYxJkw= +go.opentelemetry.io/contrib/zpages v0.53.0/go.mod h1:iOo8fpUxMAu5+4x9DSEQeUOCeY19KaN6v2OPSeIggz4= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/bridge/opencensus v1.27.0 h1:ao9aGGHd+G4YfjBpGs6vbkvt5hoC67STlJA9fCnOAcs= -go.opentelemetry.io/otel/bridge/opencensus v1.27.0/go.mod h1:uRvWtAAXzyVOST0WMPX5JHGBaAvBws+2F8PcC5gMnTk= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= +go.opentelemetry.io/otel/bridge/opencensus v1.28.0 h1:/BcyAV1bUJjSVxoeKwTQL9cS4X1iC6izZ9mheeuVSCU= +go.opentelemetry.io/otel/bridge/opencensus v1.28.0/go.mod h1:FZp2xE+46yAyp3DfLFALze58nY0iIE8zs+mCgkPAzq0= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 h1:zBPZAISA9NOc5cE8zydqDiS0itvg/P/0Hn9m72a5gvM= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0/go.mod h1:gcj2fFjEsqpV3fXuzAA+0Ze1p2/4MJ4T7d77AmkvueQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0/go.mod h1:yeGZANgEcpdx/WK0IvvRFC+2oLiMS2u4L/0Rj2M2Qr0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 h1:aLmmtjRke7LPDQ3lvpFz+kNEH43faFhzW7v8BFIEydg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0/go.mod h1:TC1pyCt6G9Sjb4bQpShH+P5R53pO6ZuGnHuuln9xMeE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= @@ -509,14 +513,18 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 h1:BJee2iLkfRfl9lc7aFmBwkWxY/RI1RDdXepSF6y8TPE= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0/go.mod h1:DIzlHs3DRscCIBU3Y9YSzPfScwnYnzfnCd4g8zA7bZc= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 h1:EVSnY9JbEEW92bEkIYOVMw4q1WJxIAGoFTrtYOzWuRQ= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0/go.mod h1:Ea1N1QQryNXpCD0I1fdLibBAIpQuBkznMmkdKrapk1Y= +go.opentelemetry.io/otel/log v0.4.0 h1:/vZ+3Utqh18e8TPjuc3ecg284078KWrR8BRz+PQAj3o= +go.opentelemetry.io/otel/log v0.4.0/go.mod h1:DhGnQvky7pHy82MIRV43iXh3FlKN8UUKftn0KbLOq6I= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/log v0.4.0 h1:1mMI22L82zLqf6KtkjrRy5BbagOTWdJsqMY/HSqILAA= +go.opentelemetry.io/otel/sdk/log v0.4.0/go.mod h1:AYJ9FVF0hNOgAVzUG/ybg/QttnXhUePWAupmCqtdESo= go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= From d3c7d67618d1b76f1103ca1c4aed55beb133332f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 17 Jul 2024 08:15:02 +0200 Subject: [PATCH 47/52] Update All OTEL Collector contrib packages to v0.105.0 (#5756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fconnector%2fspanmetricsconnector/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fexporter%2fkafkaexporter/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fextension%2fstorage/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2fpkg%2ftranslator%2fjaeger/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fjaegerreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fkafkareceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver](https://togithub.com/open-telemetry/opentelemetry-collector-contrib) | `v0.104.0` -> `v0.105.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-telemetry%2fopentelemetry-collector-contrib%2freceiver%2fzipkinreceiver/v0.104.0/v0.105.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-collector-contrib (github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector) ### [`v0.105.0`](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/blob/HEAD/CHANGELOG.md#v01050) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/compare/v0.104.0...v0.105.0) ##### πŸ›‘ Breaking changes πŸ›‘ - `skywalkingexporter`: Remove unmaintained component ([#​23796](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/23796)) - `elasticsearchexporter`: Make "dedup" option no-op, always de-duplicate. ([#​33773](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33773)) Elasticsearch does not permit duplicate keys in JSON objects, so there is no value in being able to configure deduplication. - `elasticsearchexporter`: Remove defunct "file" and "fields" configuration settings. ([#​33803](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33803)) This is a breaking change only because removing the attributes would prevent collector startup if those attributes are specified, but otherwise there is no functional change. These configuration attributes have never done anything. - `stanza`: errors from Operator.Process are returned instead of silently ignored. ([#​33783](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33783)) This public function is affected: https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza@v0.104.0/operator/helper#WriterOperator.Write - `vcenterreceiver`: Enables various vCenter metrics that were disabled by default until v0.105 ([#​34022](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34022)) The following metrics will be enabled by default "vcenter.host.network.packet.drop.rate", "vcenter.vm.cpu.readiness", "vcenter.host.cpu.capacity", and "vcenter.host.cpu.reserved". ##### 🚩 Deprecations 🚩 - `lokiexporter`: Deprecate component ([#​33916](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33916)) ##### πŸš€ New components πŸš€ - `sumconnector`: creates a wireframe and initial pr to develop from ([#​32669](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32669)) - `extensions/observer/cfgardenobserver`: Add a new observer that discovers containers through the Garden API ([#​33618](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33618)) ##### πŸ’‘ Enhancements πŸ’‘ - `pkg/ottl`: Added Hex() converter function ([#​31929](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/31929)) - `pkg/ottl`: Add IsRootSpan() converter function. ([#​32918](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32918)) Converter `IsRootSpan()` returns `true` if the span in the corresponding context is root, that means its `parent_span_id` equals to hexadecimal representation of zero. In all other scenarios function returns `false`. - `vcenterreceiver`: Adds additional vCenter resource pool metrics and a memory_usage_type attribute for vcenter.resource_pool.memory.usage metric to use. ([#​33607](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33607)) Added "vcenter.resource_pool.memory.swapped", "vcenter.resource_pool.memory.ballooned", and "vcenter.resource_pool.memory.granted" metrics. Also added an additional attribute, "memory_usage_type" for "vcenter.resource_pool.memory.usage" metric, which is currently under a feature gate. - `kubeletstatsreceiver`: Add `k8s.pod.memory.node.utilization` and `k8s.container.memory.node.utilization` metrics ([#​33591](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33591)) - `vcenterreceiver`: Adds vCenter metrics at the datacenter level. ([#​33607](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33607)) Introduces various datacenter metrics which work by aggregating stats from datastores, clusters, hosts, and VM's. - `processor/resource, processor/attributes`: Add an option to extract value from a client address by specifying `client.address` value in the `from_context` field. ([#​34051](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34051)) - `awss3receiver`: Add support for retrieving logs and metrics to the AWS S3 Receiver. ([#​30750](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/30750)) - `receiver/azuremonitorreceiver`: Add support for Managed Identity and Default Credential auth ([#​31268](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/31268), [#​33584](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33584)) - `azuremonitorreceiver`: Add `maximum_number_of_records_per_resource` config parameter in order to overwrite default ([#​32165](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32165)) - `clickhouseexporter`: Upgrading stability for logs to beta ([#​33615](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33615)) The logs exporter has been proven to be stable for large scale production deployments. Configuration options specific to logs are unlikely to change. - `cloudfoundryreceiver`: Add support to receive CloudFoundry Logs ([#​32671](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32671)) - `datadogreceiver`: Add support for metrics in Datadog receiver ([#​18278](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/18278)) - `datadogexporter`: Add a feature gate `exporter.datadogexporter.TraceExportUseCustomHTTPClient` that allows a custom HTTP client to be used in trace export ([#​34025](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34025)) This is an experimental feature. By default the feature gate is disabled and trace export uses a default HTTP client. - `elasticsearchexporter`: Introduce experimental `telemetry.log_request_body` and `telemetry.log_response_body` config ([#​33854](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33854)) - `cmd/opampsupervisor`: Adds support for forwarding custom messages to/from the agent ([#​33575](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33575)) - `geoipprocessor`: Add providers configuration and maxmind provider factory ([#​33269](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33269)) - `healthcheckv2extension`: Add partial gRPC service implementation to healthcheckv2. ([#​26661](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/26661)) - `healthcheckv2extension`: Add support for streaming Watch RPC to healthcheckv2 gRPC service. ([#​26661](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/26661)) - `healthcheckv2extension`: Add HTTP service to healthcheckv2 ([#​26661](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/26661)) - `splunkhecexporter`: Increase the performance of JSON marshaling ([#​34011](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34011)) - `pkg/stanza`: Add `parse_ints` config in json parser to support parsing int or float properly ([#​33696](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33696)) - `loadbalancingexporter`: Adds a new streamID routingKey, which will route based on the datapoint ID. See updated README for details ([#​32513](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32513)) - `awsxrayexporter`: Allow multiple log group names/arns to be set in environmental variables ([#​33795](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33795)) - `dockerobserver`: Add hint to error when using float for `api_version` field ([#​34043](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34043)) - `dockerstatsreceiver`: Add hint to error when using float for `api_version` field ([#​34043](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34043)) - `pkg/ottl`: Emit traces for statement sequence executions to troubleshoot OTTL statements/conditions ([#​33433](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33433)) - `pkg/stanza`: Bump 'logs.jsonParserArray' and 'logs.assignKeys' feature gates to beta. ([#​33948](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33948)) This enables the feature gates by default to allow use of the `json_array_parser` and `assign_keys` operations. - `receiver/filelog`: Add filelog.container.removeOriginalTimeField feature-flag for removing original time field ([#​33946](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33946)) - `statsdreceiver`: Allow configuring summary percentiles ([#​33701](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33701)) - `pkg/stanza`: Switch to faster json parser lib for container operator ([#​33929](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33929)) - `telemetrygen`: telemetrygen `--rate` flag changed from Int64 to Float64 ([#​33984](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33984)) - `extension/opamp`: Rely on the Collector APIs to do config redaction ([#​34078](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34078)) Previously all config fields had to be redacted, now `configopaque.String` is used to determine which fields should be redacted. As a result, fields that are not sensitive are no longer redacted. - `azuremonitorreceiver`: Upgrade stability to alpha ([#​33689](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33689)) - `windowsperfcountersreceiver`: `windowsperfcountersreceiver` now appends an index number to additional instance names that share a name. An example of this is when scraping `
rocess(*)` counters with multiple running instances of the same executable. ([#​32319](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32319)) **NOTES** - This change can expose cardinality issues where the counters were previously collapsed under the non-indexed instance name. - The change mimics Windows Performance Monitor behavior: The first instance name remains unchanged, additional instances are suffixed with `#` where `N=1` and is increased for each duplicate. - e.g. Given 3 powershell instances, this will return `powershell`, `powershell#1` and `powershell#2`. ##### 🧰 Bug fixes 🧰 - `servicegraphconnector`: Fix failed label does not work leads to servicegraph metrics error ([#​32018](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/32018)) - `apachesparkreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33906](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33906)) - `azureblobreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33902](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33902)) - `countconnector`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33903](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33903)) - `deltatorateprocessor`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33904](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33904)) - `httpcheckreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33897](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33897)) - `metricsgenerationprocessor`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33905](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33905)) - `podmanreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33899](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33899)) - `purefareceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33901](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33901)) - `purefbreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33900](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33900)) - `zookeeperreceiver`: Updating the stability to reflect that the component is shipped as part of contrib. ([#​33898](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33898)) - `probabilisticsamplerprocessor`: Fix bug where log sampling was being reported by the counter `otelcol_processor_probabilistic_sampler_count_traces_sampled` ([#​33874](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33874)) - `cmd/telemetrygen`: Fix `make docker-telemetrygen` command. ([#​33989](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33989)) - `processor/groupbyattrsprocessor`: Fix dropping of metadata fields when processing metrics. ([#​33419](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33419)) - `testbed`: Fixes incorrect count for sent data items in load generator. ([#​34057](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34057)) - `prometheusreceiver`: Fix hash computation to include non exported fields like regex in scrape configuration for TargetAllocator ([#​29313](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/29313)) - `datadogexporter`: Exit when API key validation fails and `api::fail_on_invalid_key` is set to `true`. ([#​33935](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33935)) - `kafkametricsreceiver`: Fix issue with incorrect consumer offset ([#​33309](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33309)) - `sqlserverreceiver`: Enable default metrics to properly trigger SQL Server scrape ([#​34065](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/34065)) - `syslogreceiver`: Allow to define `max_octets` for octet counting RFC5424 syslog parser ([#​33182](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/33182)) - `windowsperfcountersreceiver`: Metric definitions with no matching performance counter are no longer included as metrics with zero datapoints in the scrape output. ([#​4972](https://togithub.com/open-telemetry/opentelemetry-collector-contrib/issues/4972))
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). Signed-off-by: Mend Renovate --- go.mod | 28 +++++++++++++-------------- go.sum | 60 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/go.mod b/go.mod index 799ffa645fb..cf46248a6d2 100644 --- a/go.mod +++ b/go.mod @@ -23,13 +23,13 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 github.com/kr/pretty v0.3.1 github.com/olivere/elastic v6.2.37+incompatible - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.105.0 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.55.0 @@ -161,13 +161,13 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.105.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.105.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect diff --git a/go.sum b/go.sum index c39f43ff89c..6128a76429a 100644 --- a/go.sum +++ b/go.sum @@ -254,36 +254,36 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0 h1:6dvpPt8pCcV+TfMnnanFk2NQYf9HN1voSS9iIHdW+L8= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.104.0/go.mod h1:MfSM6mt9qH3vHCaj2rlX6IY/7fN+zCLzNJC25XG9rNU= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0 h1:xDA/V4cZ4LXj70la1uzvGaX/xfzeGIEq3txhF7W6TAg= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.104.0/go.mod h1:BxDMJl5xzSbCwcuVFs9jIrBwc1sflBVdihNJxcEKkOE= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0 h1:VD2R4q2XziQCJIAsQG2qhlSKyDoT9XaTR2LNkJHs2C0= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.104.0/go.mod h1:sOdPmcOeSXXqZeBflu3Oa+0aWFL8QkAKpr/X1txJYSs= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0 h1:4ke4j/y7AQnRAyYveB+KGcdjVYEKVrwTxc3BDHagdd0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.104.0/go.mod h1:I2zX9YBggIum9LAHXN1DqqbYOENrHXbXdkXouhwVCHw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0 h1:/koTWTWCFF7tBYkDX5UzCaEc/ceTU8jij/Yzuj0So3M= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.104.0/go.mod h1:KWVekIHTPScOrLKVYOiijxfEdGK5OBhD4EFNBh96ESg= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0 h1:BGKkg/wBfDeKSMqj8tMC6v03XtMuL9lNltfZiMViBAU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.104.0/go.mod h1:SqzW5R0kOIs6HAk18+zH+Ej7CehtLVKtyBifT1wqAt0= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0 h1:pH5vUaC85j8DcgfgFXlQW3QRoED9DCAGJ5lGw4J/UvE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.104.0/go.mod h1:BsappX8t6TNyk+M0UZ3xMwEtn2IIHy7hqXlThdBoKjI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 h1:bgS1X1UnUuYfKXsQPq3U50jsMNpN5lI+BcDeklPJOW8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0/go.mod h1:tImy4FWNu1qpaXRVaNi2BU+TmZHtYgLO6LbB6mspZio= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 h1:Pl4rXXpRG/xJuNWUS3I/w1jViHcrssMf47bGX/Ug/KY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0/go.mod h1:tP4dyc5+g/qoXYb8lmNj+y+Nhphn4MkL23/np0Zhx2g= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0 h1:V58XfkZBVuOcNL/+US/ZnG8mVy5AbVHV49mGDIgIMo8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.104.0/go.mod h1:HpEqZW6TOsujFvvOSkcCFj7N2NEW4LP/Q6X7/ryfSnA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0 h1:3joQv7QiLvsVfrpqYAxHvq3bKUaUEpgg93fMLW+TU2w= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.104.0/go.mod h1:aUAgxXQQPiSajwMXQv4LobDTc16ezeF9S1Xh53yHbOg= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0 h1:oIYYjBh2kNi7APSArA/9YCQzLwOlMdUhqMxUoMoTChY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.104.0/go.mod h1:hRayDDoU1e1POXuDO7RpwcqIirFJoCdSgHgICY0hNNI= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0 h1:9HJ3ejNoiMFWxTRy9gobdurEocf79QlxwlYrOY9tMIQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.104.0/go.mod h1:Ax4DroNn/xKyjWoJCd3FQE9xOZqHSTdDEj1I3HLNOeQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0 h1:sE+B+i3m9sMecnJZkljnUrykzkRkEFvXJWPckwbQOVc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.104.0/go.mod h1:cyzp/19NsVmEz7mTS/LHf2m8e26MnlGK8x1kga3rX9I= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0 h1:U04Ezl3Keb1j6bcVktvgvAbbMEyPDkM5sNboQgPYI1w= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.104.0/go.mod h1:GbpsurP8UERCcHyIB/gUMKcAK3kIypKGE0O+aqbNa/c= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.105.0 h1:DVaUWxeO8VNH/zQrP9vqz8eZwaaVzWQNCmcWGxbFoWk= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.105.0/go.mod h1:45iX3DRsbK2XlbHzEWtIvud56FE2XdC7crKIne4DUaU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.105.0 h1:HcFHS9xNt2nI9yphhvvgWekr9zsP2jVi8IQUckAxCUk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.105.0/go.mod h1:DB9+mDKgg/nO+vZca48EWvCTcOjHyjOeJKAbP+WfPXU= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.105.0 h1:HmimWATFFNI8o6n52DXTS2EjFRa6aETNqmA3MBGAxSI= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.105.0/go.mod h1:DoCIQkjzSFD/rRq9rsI4kzYKcHRn6B7g7txILM18dHQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.105.0 h1:kHHL4A9wL6TxM2sIUEXUpFXGPxrW7u002FJK+majI0s= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.105.0/go.mod h1:I+fL3494NrarNgHHs2D7kz0v02KGCmwmp3L89KUqENA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.105.0 h1:k89VhlOwi0uYkEOgoR0ISTct07GaBoQmhnI1yypKa4I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.105.0/go.mod h1:6k6afq9nYwfBbo9z0XhS1AJzFtosTFHoBVJ5v/Ugv+8= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.105.0 h1:xQfrUHMnTnXolFjIaMAoORoLRBl7/yD8oygjXF4Fdoo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.105.0/go.mod h1:S/+5qZ/2j2QmSpdgC97gLdXhuK71IGeJHoG2D/szuy8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.105.0 h1:HHQOzApli6RjBO0Ujh8OiBIXtFErojbCEBAzsyw/39Q= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.105.0/go.mod h1:96jBGagp5wck48k+qfJpxc3SIj3zLRXbP9E1m97gvLI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.105.0 h1:Zn3WKPLUXcIQTeu5K2elsi/Ncq14MBRZQPaVdJC+6cQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.105.0/go.mod h1:hzu5KvOYEH5W9OpVc+iRXUAvj7GHcLyyR4qjIH+hOhQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.105.0 h1:hs7TaJClEAhHrj71XcaYqlYnIOpOYQgoHqhnnBNrOK8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.105.0/go.mod h1:ehzaiDdkrww7l1Stvse5GCOAsAZOpFcgeIbB/2PqFs4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.105.0 h1:PfbW/oTNBNOCzantcwnGXMuc+qhMSUhdcWnfO0qXEhs= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.105.0/go.mod h1:NZsH4m+WpkVKuUYK6Te0Z012jjhfmVcVL3M1W/0Hw4w= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.105.0 h1:EIMptO6ZZeP734nBLxNVftrWA+OEGtgsxarNH7rao2A= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.105.0/go.mod h1:/2F91Hsx7RAn/FENz/7MRbHBkBYQ/uX6t4tYJfyeBfM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.105.0 h1:60worMGZbZFw6djolg/CVExX6DPQoXgfM4pmdZj2b7E= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.105.0/go.mod h1:Nhq0L1GhTdyl/Td94xCiys0kJMO9lOsezhYRXz0MTvQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.105.0 h1:KGvKn2n/tV5aG3JlryEgXnnSVnY0O6YFWGOY72OI8MY= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.105.0/go.mod h1:NKh0a5RFTHnvxRRmjlV96ZzSc5xZrHr1yPRWxskjBB0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.105.0 h1:JADJYzFGjD3c7eVKYYAHxMFE9rBtMTEPM/4t8C8ww3Q= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.105.0/go.mod h1:rGyiKbLfQyHk5Q+ZSGs4wH8kb2J+SbIlEiytjB/cDdI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.105.0 h1:JLYDrRk4oJB5CZY49Q1AhvpN8Tnl8faPG0CqpnDOFIw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.105.0/go.mod h1:73LyO27uXzwtEZrSq/7b1wi5FG9aHx6TUVcCDaxJ5mw= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= From 0e7f3f4e43352c9814f2a2bf34dd13af3e702d3c Mon Sep 17 00:00:00 2001 From: Raghuram Kannan <78465537+FlamingSaint@users.noreply.github.com> Date: Wed, 17 Jul 2024 21:18:27 +0530 Subject: [PATCH 48/52] Add a threshold for expected zero values in the SPM script (#5753) ## Which problem is this PR solving? - Makes sure the SPM CI doesn't fail if the first value received is zero. ## Description of the changes - The script now waits until the threshold (Currently set to 3) number of zero values are received before throwing an error ## How was this change tested? - Manually ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: FlamingSaint --- scripts/spm-integration-test.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/spm-integration-test.sh b/scripts/spm-integration-test.sh index a0270586130..61e99911206 100755 --- a/scripts/spm-integration-test.sh +++ b/scripts/spm-integration-test.sh @@ -61,17 +61,24 @@ validate_service_metrics() { # Store the values in an array mapfile -t metric_points < <(echo "$response" | jq -r '.metrics[0].metricPoints[].gaugeValue.doubleValue') echo "Metric datapoints found for service '$service': " "${metric_points[@]}" - # Check that all values are non-zero + # Check that atleast some values are non-zero after the threshold local non_zero_count=0 + local expected_non_zero_count=3 + local zero_count=0 + local expected_max_zero_count=3 for value in "${metric_points[@]}"; do if [[ $(echo "$value > 0.0" | bc) == "1" ]]; then non_zero_count=$((non_zero_count + 1)) else - echo "❌ ERROR: Zero values not expected" + zero_count=$((zero_count + 1)) + fi + + if [[ $zero_count -gt $expected_max_zero_count ]]; then + echo "❌ ERROR: Zero values crossing threshold limit not expected (Threshold limit - '$expected_max_zero_count')" return 1 fi done - if [ $non_zero_count -lt 3 ]; then + if [ $non_zero_count -lt $expected_non_zero_count ]; then echo "⏳ Expecting at least 3 non-zero data points" return 1 fi From c68136e6fceaa6c00e1b4b6ce618414b18f78a26 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 17 Jul 2024 12:53:10 -0300 Subject: [PATCH 49/52] [bug] [hotrod] Delay env var mapping until logger is initialized (#5760) ## Which problem is this PR solving? - Resolves #5759 ## Description of the changes - Invoke mapping function (which takes logger) after the logger is initialized - It is safe to do because none of the env vars control the logic for logger initialization ## How was this change tested? - `$ JAEGER_AGENT_PORT=xyz go run ./examples/hotrod all` - Before the change this command would cause a panic Signed-off-by: Yuri Shkuro --- examples/hotrod/cmd/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/hotrod/cmd/root.go b/examples/hotrod/cmd/root.go index 7db0b0bda83..1a6a0d22211 100644 --- a/examples/hotrod/cmd/root.go +++ b/examples/hotrod/cmd/root.go @@ -56,8 +56,6 @@ func init() { // onInitialize is called before the command is executed. func onInitialize() { - jaegerclientenv2otel.MapJaegerToOtelEnvVars(logger) - zapOptions := []zap.Option{ zap.AddStacktrace(zapcore.FatalLevel), zap.AddCallerSkip(1), @@ -68,6 +66,9 @@ func onInitialize() { ) } logger, _ = zap.NewDevelopment(zapOptions...) + + jaegerclientenv2otel.MapJaegerToOtelEnvVars(logger) + metricsFactory = prometheus.New().Namespace(metrics.NSOptions{Name: "hotrod", Tags: nil}) if config.MySQLGetDelay != fixDBConnDelay { From edfee785ed692650483d1dbc39e73ff1a87569b1 Mon Sep 17 00:00:00 2001 From: mehul gautam Date: Thu, 18 Jul 2024 02:54:23 +0530 Subject: [PATCH 50/52] Added a docker-compose for hotrod e2e test (#5740) ## Which problem is this PR solving? - https://github.com/jaegertracing/jaeger/issues/5735 ## Description of the changes - added docker-compose file to test hotrod so that is can connect to jaeger ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: mehul gautam Co-authored-by: mehul gautam --- .github/workflows/ci-docker-hotrod.yml | 2 +- examples/hotrod/docker-compose.yml | 6 +-- scripts/hotrod-integration-test.sh | 69 ++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-docker-hotrod.yml b/.github/workflows/ci-docker-hotrod.yml index 16f39344404..1bba419d9a9 100644 --- a/.github/workflows/ci-docker-hotrod.yml +++ b/.github/workflows/ci-docker-hotrod.yml @@ -51,5 +51,5 @@ jobs: QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Print logs from hotrod - run: docker logs example-hotrod + run: docker compose -f ./examples/hotrod/docker-compose.yml logs if: failure() diff --git a/examples/hotrod/docker-compose.yml b/examples/hotrod/docker-compose.yml index 250f78f82b8..048de7de59e 100644 --- a/examples/hotrod/docker-compose.yml +++ b/examples/hotrod/docker-compose.yml @@ -1,11 +1,10 @@ version: '3.7' - # To run a specific version of Jaeger, use environment variable, e.g.: # JAEGER_VERSION=1.52 docker compose up services: jaeger: - image: jaegertracing/all-in-one:${JAEGER_VERSION:-latest} + image: ${REGISTRY:-}jaegertracing/all-in-one:${JAEGER_VERSION:-latest} ports: - "16686:16686" - "4317:4317" @@ -14,8 +13,9 @@ services: - LOG_LEVEL=debug networks: - jaeger-example + hotrod: - image: jaegertracing/example-hotrod:${JAEGER_VERSION:-latest} + image: ${REGISTRY:-}jaegertracing/example-hotrod:${JAEGER_VERSION:-latest} # To run the latest trunk build, find the tag at Docker Hub and use the line below # https://hub.docker.com/r/jaegertracing/example-hotrod-snapshot/tags #image: jaegertracing/example-hotrod-snapshot:0ab8f2fcb12ff0d10830c1ee3bb52b745522db6c diff --git a/scripts/hotrod-integration-test.sh b/scripts/hotrod-integration-test.sh index 40149bef8ff..8fc080e9378 100755 --- a/scripts/hotrod-integration-test.sh +++ b/scripts/hotrod-integration-test.sh @@ -2,32 +2,83 @@ set -euxf -o pipefail +docker_compose_file="./examples/hotrod/docker-compose.yml" +platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" + +teardown() { + echo "Tearing down..." + docker compose -f "$docker_compose_file" down +} +trap teardown EXIT + make build-examples GOOS=linux GOARCH=amd64 make build-examples GOOS=linux GOARCH=s390x make build-examples GOOS=linux GOARCH=ppc64le make build-examples GOOS=linux GOARCH=arm64 -REPO=jaegertracing/example-hotrod -platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" make prepare-docker-buildx +make create-baseimg -# build image locally (-l) for integration test +# Loop through each platform (separated by commas) +for platform in $(echo "$platforms" | tr ',' ' '); do + # Extract the architecture from the platform string + arch=${platform##*/} # Remove everything before the last slash + make "build-all-in-one" GOOS=linux GOARCH="${arch}" +done + +# Build image locally (-l) for integration test bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${platforms}" +bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one -d cmd/all-in-one -p "${platforms}" -t release -# pass --name example-hotrod so that we can do `docker logs example-hotrod` later -export CID -CID=$(docker run -d --name example-hotrod -p 8080:8080 "localhost:5000/${REPO}:${GITHUB_SHA}") +JAEGER_VERSION=$GITHUB_SHA REGISTRY="localhost:5000/" docker compose -f "$docker_compose_file" up -d i=0 -while [[ "$(curl -s -o /dev/null -w '%{http_code}' localhost:8080)" != "200" && ${i} -lt 30 ]]; do +while [[ "$(curl -s -o /dev/null -w '%{http_code}' localhost:8080)" != "200" && $i -lt 30 ]]; do sleep 1 i=$((i+1)) done + body=$(curl localhost:8080) if [[ $body != *"Rides On Demand"* ]]; then echo "String \"Rides On Demand\" is not present on the index page" exit 1 fi -docker rm -f "$CID" -bash scripts/build-upload-a-docker-image.sh -c example-hotrod -d examples/hotrod -p "${platforms}" +response=$(curl -i -X POST "http://localhost:8080/dispatch?customer=123") +TRACE_ID=$(echo "$response" | grep -Fi "Traceresponse:" | awk '{print $2}' | cut -d '-' -f 2) + +if [ -n "$TRACE_ID" ]; then + echo "TRACE_ID is not empty: $TRACE_ID" +else + echo "TRACE_ID is empty" + exit 1 +fi + +JAEGER_QUERY_URL="http://localhost:16686" +EXPECTED_SPANS=35 +MAX_RETRIES=30 +SLEEP_INTERVAL=10 + +# Function to poll Jaeger for the trace +poll_jaeger() { + local trace_id=$1 + local url="${JAEGER_QUERY_URL}/api/traces/${trace_id}" + + curl -s "${url}" | jq '.data[0].spans | length' || echo "0" +} + +# Polling loop +for ((i=1; i<=MAX_RETRIES; i++)); do + span_count=$(poll_jaeger "${TRACE_ID}") + + if [[ "$span_count" -ge "$EXPECTED_SPANS" ]]; then + echo "Trace found with $span_count spans." + exit 0 + fi + + echo "Retry $i/$MAX_RETRIES: Trace not found or insufficient spans ($span_count/$EXPECTED_SPANS). Retrying in $SLEEP_INTERVAL seconds..." + sleep $SLEEP_INTERVAL +done + +echo "Failed to find the trace with the expected number of spans within the timeout period." +exit 1 From 813ff32a563072fa6b5ea634d06013ca6cf63ed4 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Thu, 18 Jul 2024 23:36:46 -0300 Subject: [PATCH 51/52] Ensure hotrod image is published at the end of e2e test (#5764) --- scripts/hotrod-integration-test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/hotrod-integration-test.sh b/scripts/hotrod-integration-test.sh index 8fc080e9378..2cb8d71266a 100755 --- a/scripts/hotrod-integration-test.sh +++ b/scripts/hotrod-integration-test.sh @@ -68,17 +68,23 @@ poll_jaeger() { } # Polling loop +span_count=0 for ((i=1; i<=MAX_RETRIES; i++)); do span_count=$(poll_jaeger "${TRACE_ID}") if [[ "$span_count" -ge "$EXPECTED_SPANS" ]]; then echo "Trace found with $span_count spans." - exit 0 + break fi echo "Retry $i/$MAX_RETRIES: Trace not found or insufficient spans ($span_count/$EXPECTED_SPANS). Retrying in $SLEEP_INTERVAL seconds..." sleep $SLEEP_INTERVAL done -echo "Failed to find the trace with the expected number of spans within the timeout period." -exit 1 +if [[ "$span_count" -lt "$EXPECTED_SPANS" ]]; then + echo "Failed to find the trace with the expected number of spans within the timeout period." + exit 1 +fi + +# Ensure the image is published after successful test (no -l flag) +bash scripts/build-upload-a-docker-image.sh -c example-hotrod -d examples/hotrod -p "${platforms}" From b2aded6cad0112ec613ff3414c9736ed860907ec Mon Sep 17 00:00:00 2001 From: Manoramsharma <84619980+Manoramsharma@users.noreply.github.com> Date: Sat, 20 Jul 2024 04:48:29 +0530 Subject: [PATCH 52/52] Skip building HotROD for all platforms for pull requests (#5765) ## Which problem is this PR solving? - Resolves #5743 ## Description of the changes - Similar to the functionality we have for all-in-one image I tried to achieve same build configuration supported by corresponding script file. ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Manoramsharma <84619980+Manoramsharma@users.noreply.github.com> Signed-off-by: Yuri Shkuro Co-authored-by: Yuri Shkuro --- .github/workflows/ci-docker-hotrod.yml | 16 ++++++-- scripts/hotrod-integration-test.sh | 57 +++++++++++++++++++------- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-docker-hotrod.yml b/.github/workflows/ci-docker-hotrod.yml index 1bba419d9a9..a083953d59a 100644 --- a/.github/workflows/ci-docker-hotrod.yml +++ b/.github/workflows/ci-docker-hotrod.yml @@ -39,13 +39,21 @@ jobs: - name: Export BRANCH variable uses: ./.github/actions/setup-branch - - name: Install tools - run: make install-ci - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 + - name: Define BUILD_FLAGS var if running on a Pull Request + run: | + case ${GITHUB_EVENT_NAME} in + pull_request) + echo "BUILD_FLAGS=-l -p linux/amd64" >> ${GITHUB_ENV} + ;; + *) + echo "BUILD_FLAGS=" >> ${GITHUB_ENV} + ;; + esac + - name: Build, test, and publish hotrod image - run: bash scripts/hotrod-integration-test.sh + run: bash scripts/hotrod-integration-test.sh ${{ env.BUILD_FLAGS }} env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/scripts/hotrod-integration-test.sh b/scripts/hotrod-integration-test.sh index 2cb8d71266a..7f56eb7a85c 100755 --- a/scripts/hotrod-integration-test.sh +++ b/scripts/hotrod-integration-test.sh @@ -2,8 +2,33 @@ set -euxf -o pipefail +print_help() { + echo "Usage: $0 [-l] [-D] [-p platforms] [-h]" + echo "-h: Print help" + echo "-l: Enable local-only mode that only pushes images to local registry" + echo "-p: Comma-separated list of platforms to build for (default: all supported)" + exit 1 +} + docker_compose_file="./examples/hotrod/docker-compose.yml" platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" +current_platform="$(go env GOOS)/$(go env GOARCH)" +LOCAL_FLAG='' + +while getopts "lp:h" opt; do + case "${opt}" in + l) + # in the local-only mode the images will only be pushed to local registry + LOCAL_FLAG='-l' + ;; + p) + platforms=${OPTARG} + ;; + *) + print_help + ;; + esac +done teardown() { echo "Tearing down..." @@ -11,24 +36,26 @@ teardown() { } trap teardown EXIT -make build-examples GOOS=linux GOARCH=amd64 -make build-examples GOOS=linux GOARCH=s390x -make build-examples GOOS=linux GOARCH=ppc64le -make build-examples GOOS=linux GOARCH=arm64 - make prepare-docker-buildx make create-baseimg -# Loop through each platform (separated by commas) +# Build hotrod binary for each target platform (separated by commas) for platform in $(echo "$platforms" | tr ',' ' '); do + # Extract the operating system from the platform string + os=${platform%%/*} #remove everything after the last slash # Extract the architecture from the platform string arch=${platform##*/} # Remove everything before the last slash - make "build-all-in-one" GOOS=linux GOARCH="${arch}" + make build-examples GOOS="${os}" GOARCH="${arch}" done -# Build image locally (-l) for integration test -bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${platforms}" -bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one -d cmd/all-in-one -p "${platforms}" -t release +# Build hotrod image locally (-l) for integration test. +# Note: hotrod's Dockerfile is different from main binaries, +# so we do not pass flags like -b and -t. +bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${current_platform}" + +# Build all-in-one image locally (-l) for integration test +make build-all-in-one +bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one -d cmd/all-in-one -p "${current_platform}" -t release JAEGER_VERSION=$GITHUB_SHA REGISTRY="localhost:5000/" docker compose -f "$docker_compose_file" up -d @@ -57,9 +84,8 @@ fi JAEGER_QUERY_URL="http://localhost:16686" EXPECTED_SPANS=35 MAX_RETRIES=30 -SLEEP_INTERVAL=10 +SLEEP_INTERVAL=3 -# Function to poll Jaeger for the trace poll_jaeger() { local trace_id=$1 local url="${JAEGER_QUERY_URL}/api/traces/${trace_id}" @@ -67,7 +93,7 @@ poll_jaeger() { curl -s "${url}" | jq '.data[0].spans | length' || echo "0" } -# Polling loop +# Poll Jaeger until trace with desired number of spans is loaded or we timeout. span_count=0 for ((i=1; i<=MAX_RETRIES; i++)); do span_count=$(poll_jaeger "${TRACE_ID}") @@ -86,5 +112,6 @@ if [[ "$span_count" -lt "$EXPECTED_SPANS" ]]; then exit 1 fi -# Ensure the image is published after successful test (no -l flag) -bash scripts/build-upload-a-docker-image.sh -c example-hotrod -d examples/hotrod -p "${platforms}" +# Ensure the image is published after successful test (maybe with -l flag if on a pull request). +# This is where all those multi-platform binaries we built earlier are utilized. +bash scripts/build-upload-a-docker-image.sh ${LOCAL_FLAG} -c example-hotrod -d examples/hotrod -p "${platforms}"