From c7a332018d48789f4ebdc815fd365953940af3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 22 Sep 2023 12:44:44 +0200 Subject: [PATCH] feat!: use OTLP sources by default --- .changelog/3297.changed.txt | 1 + deploy/helm/sumologic/README.md | 8 +- deploy/helm/sumologic/values.yaml | 10 +- docs/otlp-source.md | 40 +++---- docs/v4-migration-doc.md | 38 +++++- tests/helm/logs_test.go | 5 +- tests/helm/metrics_test.go | 55 ++++++++- .../goldenfile/events_otc/basic.output.yaml | 4 +- .../goldenfile/events_otc/options.output.yaml | 4 +- .../events_otc_statefulset/basic.output.yaml | 5 + .../events_otc_statefulset/custom.input.yaml | 2 +- .../events_otc_statefulset/custom.output.yaml | 5 - .../events_otc_statefulset/proxy.output.yaml | 5 + .../metadata_logs_otc/otel.output.yaml | 25 ++-- .../metadata_logs_otc/templates.output.yaml | 25 ++-- .../basic.output.yaml | 5 + .../custom.input.yaml | 2 +- .../custom.output.yaml | 5 - .../additional_endpoints.output.yaml | 111 +----------------- .../metadata_metrics_otc/basic.output.yaml | 111 +----------------- .../metadata_metrics_otc/custom.input.yaml | 2 +- .../metadata_metrics_otc/custom.output.yaml | 111 +++++++++++++++++- .../filtered_app_metrics.output.yaml | 111 +----------------- .../basic.output.yaml | 5 + .../custom.input.yaml | 2 +- .../custom.output.yaml | 5 - .../basic.output.yaml | 5 + .../custom.input.yaml | 2 +- .../custom.output.yaml | 5 - .../basic.output.yaml | 5 + .../custom.input.yaml | 2 +- .../custom.output.yaml | 5 - .../traces-sampler/simple.output.yaml | 2 +- ..._otlp_test.go => helm_http_source_test.go} | 2 +- tests/integration/values/values_common.yaml | 5 - .../values/values_helm_http_source.yaml | 15 +++ .../integration/values/values_helm_otlp.yaml | 15 --- 37 files changed, 308 insertions(+), 457 deletions(-) create mode 100644 .changelog/3297.changed.txt rename tests/integration/{helm_otlp_test.go => helm_http_source_test.go} (96%) create mode 100644 tests/integration/values/values_helm_http_source.yaml delete mode 100644 tests/integration/values/values_helm_otlp.yaml diff --git a/.changelog/3297.changed.txt b/.changelog/3297.changed.txt new file mode 100644 index 0000000000..e813601dd0 --- /dev/null +++ b/.changelog/3297.changed.txt @@ -0,0 +1 @@ +feat!: use OTLP sources by default \ No newline at end of file diff --git a/deploy/helm/sumologic/README.md b/deploy/helm/sumologic/README.md index 8ce6d37405..d7201df3cf 100644 --- a/deploy/helm/sumologic/README.md +++ b/deploy/helm/sumologic/README.md @@ -35,7 +35,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.events.persistence.persistentVolume.storageClass` | The storageClassName for the persistent storage volume | `Nil` | | `sumologic.events.persistence.persistentVolume.accessMode` | The accessMode for the persistent storage volume | `ReadWriteOnce` | | `sumologic.events.persistence.persistentVolume.pvcLabels` | Additional PersistentVolumeClaim labels for persistent storage volumes | `{}` | -| `sumologic.events.sourceType` | The type of the Sumo Logic source being used for events ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/logs-metrics/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `http` | +| `sumologic.events.sourceType` | The type of the Sumo Logic source being used for events ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/logs-metrics/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `otlp` | | `sumologic.logs.enabled` | Set the enabled flag to false for disabling logs ingestion altogether. | `true` | | `sumologic.logs.collector.otelcol.enabled` | Enable OpenTelemetry logs collector. | `true` | | `sumologic.logs.collector.otelcloudwatch.enabled` | Flag to enable CloudWatch Collection | `false` | @@ -84,7 +84,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.logs.kubelet.otelcol.extraProcessors` | Extra processors for systemd logs. See [/docs/collecting-systemd-logs.md](/docs/collecting-systemd-logs.md) for details. | `[]` | | `sumologic.logs.fields` | Fields to be created at Sumo Logic to ensure logs are tagged with relevant metadata. [Sumo Logic help](https://help.sumologic.com/docs/manage/fields/#manage-fields) | `["cluster", "container", "daemonset", "deployment", "host", "namespace", "node", "pod", "service", "statefulset"]` | | `sumologic.logs.additionalFields` | Additional Fields to be created in Sumo Logic. [Sumo Logic help](https://help.sumologic.com/docs/manage/fields/#manage-fields) | `[]` | -| `sumologic.logs.sourceType` | The type of the Sumo Logic source being used for logs ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/logs-metrics/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `http` | +| `sumologic.logs.sourceType` | The type of the Sumo Logic source being used for logs ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/logs-metrics/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `otlp` | | `sumologic.metrics.enabled` | Set the enabled flag to false for disabling metrics ingestion altogether. | `true` | | `sumologic.metrics.otelcol.extraProcessors` | Extra processors configuration for metrics pipeline. See [/docs/collecting-application-metrics.md#metrics-modifications](/docs/collecting-application-metrics.md#metrics-modifications) for more information. | `[]` | | `sumologic.metrics.remoteWriteProxy.enabled` | Enable a load balancing proxy for Prometheus remote writes. [See docs for more information.](/docs/prometheus.md#using-a-load-balancing-proxy-for-prometheus-remote-write) | `false` | @@ -129,10 +129,10 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.metrics.collector.otelcol.annotatedPods.enabled` | Enable collection of metrics from Pods annotated with prometheus.io/\* keys. See [docs/collecting-application-metrics.md](/docs/collecting-application-metrics.md#application-metrics-are-exposed-one-endpoint-scenario) for more information. | `true` | | `sumologic.metrics.collector.otelcol.allocationStrategy` | Allocation strategy for the scrape target allocator. Valid values are: least-weighted and consistent-hashing. See: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#opentelemetrycollectorspectargetallocator | `least-weighted` | | `sumologic.metrics.dropHistogramBuckets` | Drop buckets from select high-cardinality histogram metrics, leaving only the sum and count components. | `true` | -| `sumologic.metrics.sourceType` | The type of the Sumo Logic source being used for metrics ingestion. Can be `http` or `otlp`. | `http` | +| `sumologic.metrics.sourceType` | The type of the Sumo Logic source being used for metrics ingestion. Can be `http` or `otlp`. | `otlp` | | `sumologic.traces.enabled` | Set the enabled flag to true to enable tracing ingestion. _Tracing must be enabled for the account first. Please contact your Sumo representative for activation details_ | `true` | | `sumologic.traces.spans_per_request` | Maximum number of spans sent in single batch | `100` | -| `sumologic.traces.sourceType` | The type of the Sumo Logic source being used for traces ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/traces/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `http` | +| `sumologic.traces.sourceType` | The type of the Sumo Logic source being used for traces ingestion. Can be `http` for [HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/traces/) or `otlp` for [OTLP/HTTP Source](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/). | `otlp` | | `sumologic.envFromSecret` | If enabled, accessId and accessKey will be sourced from Secret Name given. Be sure to include at least the following env variables in your secret (1) SUMOLOGIC_ACCESSID, (2) SUMOLOGIC_ACCESSKEY | `sumo-api-secret` | | `sumologic.accessId` | Sumo access ID. | `Nil` | | `sumologic.accessKey` | Sumo access key. | `Nil` | diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index a4ee639c53..8944c4d63b 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -272,7 +272,7 @@ sumologic: pvcLabels: {} # storageClass: - sourceType: http + sourceType: otlp ### Logs configuration ## Set the enabled flag to false for disabling logs ingestion altogether. @@ -435,7 +435,7 @@ sumologic: ## https://help.sumologic.com/docs/manage/fields/#manage-fields additionalFields: [] - sourceType: http + sourceType: otlp ### Metrics configuration ## Set the enabled flag to false for disabling metrics ingestion altogether. @@ -666,7 +666,7 @@ sumologic: ## The type of source we send to in Sumo. The possible values are http and otlp. ## Consult the documentation for more information. - sourceType: http + sourceType: otlp ### Traces configuration ## Set the enabled flag to false to disable traces ingestion. @@ -675,7 +675,7 @@ sumologic: ## How many spans per request should be send to receiver spans_per_request: 100 - sourceType: http + sourceType: otlp ## Configure metrics-server ## ref: https://github.com/bitnami/charts/blob/master/bitnami/metrics-server/values.yaml @@ -1583,7 +1583,7 @@ tracesSampler: # logging: # loglevel: debug otlphttp: - traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE} + traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE}/v1/traces compression: gzip service: extensions: [health_check, memory_ballast, pprof] diff --git a/docs/otlp-source.md b/docs/otlp-source.md index 05932be5ad..b263fa9f84 100644 --- a/docs/otlp-source.md +++ b/docs/otlp-source.md @@ -5,9 +5,22 @@ Historically, agents used by this Chart sent logs and metrics data to a [generic The data needed to be converted to the formats the generic HTTP source supports before being sent. Recently, we've added support for directly sending data using the OTLP protocol to Sumo Logic. This is achieved using the [OTLP -source][otlp_source]. This document explains how to use this new source with the Helm Chart. +source][otlp_source]. These sources are now used by default unless configured otherwise. -## Enabling the OTLP source +## Benefits + +Sending data directly via OTLP is more efficient, as we skip the conversion step. OTLP is also a binary-encoded format, which improves the +efficiency further. + +### Logs + +As a structured log format, OTLP frees us from the need to parse metadata out of the log body on the Sumo side. This makes the following +features work without additional manual configuration: + +- multiline parsing for the `text` log format +- correct timestamps for the `text` log format + +## Switching back to HTTP sources ### For logs @@ -16,7 +29,7 @@ Add the following to your configuration: ```yaml sumologic: logs: - sourceType: otlp + sourceType: http ``` ### For metrics @@ -26,7 +39,7 @@ Add the following to your configuration: ```yaml sumologic: metricss: - sourceType: otlp + sourceType: http ``` ### For traces @@ -36,13 +49,13 @@ Add the following to your configuration: ```yaml sumologic: traces: - sourceType: otlp + sourceType: http tracesSampler: config: exporters: otlphttp: - traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE} + traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE}/v1/traces ``` ### For events @@ -50,25 +63,12 @@ tracesSampler: ```yaml sumologic: events: - sourceType: otlp + sourceType: http ``` **Note:** The source is automatically created during Chart installation. This setting simply makes the Chart start sending data to it. If you normally have setup disabled, you need to either enable it after enabling the otlp source, or create the source manually. -## Benefits - -Sending data directly via OTLP is more efficient, as we skip the conversion step. OTLP is also a binary-encoded format, which improves the -efficiency further. - -### Logs - -As a structured log format, OTLP frees us from the need to parse metadata out of the log body on the Sumo side. This makes the following -features work without additional manual configuration: - -- multiline parsing for the `text` log format -- correct timestamps for the `text` log format - [http_source]: https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/logs-metrics/ [otlp_source]: https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/ [v3]: https://github.com/SumoLogic/sumologic-kubernetes-collection/releases/tag/v3.0.0 diff --git a/docs/v4-migration-doc.md b/docs/v4-migration-doc.md index f03c7854b5..7086683ef9 100644 --- a/docs/v4-migration-doc.md +++ b/docs/v4-migration-doc.md @@ -7,6 +7,7 @@ - [OpenTelemetry Collector](#opentelemetry-collector) - [Drop Prometheus recording rule metrics](#drop-prometheus-recording-rule-metrics) - [OpenTelemetry Collector for metrics collection](#opentelemetry-collector-for-metrics-collection) + - [Use OTLP sources by default](#use-otlp-sources-by-default) - [How to upgrade](#how-to-upgrade) - [Requirements](#requirements) - [Metrics migration](#metrics-migration) @@ -46,6 +47,13 @@ be a transparent change without any need for manual configuration changes. OpenT metrics as Prometheus did previously, and will support the same mechanisms for collecting custom application metrics. Any exceptions will be called out in the migration guide below. +### Use OTLP sources by default + +This Helm Chart automatically creates the necessary Collector and Sources in Sumo. Up until this point, these were generic HTTP sources +accepting data in different formats. As Sumo now has native support for the OTLP protocol used by Open Telemetry, we've decided to switch to +using these new sources by default. This is a completely transparent change **unless** you use the `_sourceName` or `_source` fields in your +Sumo queries. + ## How to upgrade ### Requirements @@ -119,7 +127,35 @@ In addition the following changes has been done: ### Switch to OTLP sources -:construction: +> [!NOTE] Both source types will be created by the setup job. The settings discussed here affect which source is actually used. + +**When?**: You use the `_sourceName` or `_source` fields in your Sumo queries. + +The only solution is to change the queries in question. In general, it's an antipattern to write queries against specific sources, instead +of semantic attributes of the data. + +You can switch back to the default v3 behaviour by setting: + +```yaml +sumologic: + logs: + sourceType: http + + metrics: + sourceType: http + + traces: + sourceType: http + + events: + sourceType: http + +tracesSampler: + config: + exporters: + otlphttp: + traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE}/v1/traces +``` ### Running the helm upgrade diff --git a/tests/helm/logs_test.go b/tests/helm/logs_test.go index 14ccbff280..45c0bc1985 100644 --- a/tests/helm/logs_test.go +++ b/tests/helm/logs_test.go @@ -78,7 +78,7 @@ sumologic: err := yaml.Unmarshal([]byte(otelConfigYaml), &otelConfig) require.NoError(t, err) - require.ElementsMatch(t, []string{"sumologic/containers"}, keys(otelConfig.Exporters)) + require.ElementsMatch(t, []string{"sumologic"}, keys(otelConfig.Exporters)) require.ElementsMatch(t, []string{"logs/otlp/containers"}, keys(otelConfig.Service.Pipelines)) for processorName := range otelConfig.Processors { require.NotContains(t, processorName, "systemd") @@ -126,7 +126,7 @@ sumologic: require.Contains(t, containersPipeline.Processors, "filter/include-host") } -func TestMetadataLogFormat(t *testing.T) { +func TestMetadataLogFormatHTTP(t *testing.T) { t.Parallel() templatePath := "templates/logs/otelcol/configmap.yaml" @@ -174,6 +174,7 @@ sumologic: logs: container: format: %s + sourceType: http ` valuesYaml := fmt.Sprintf(valuesYamlTemplate, testCase.logFormat) otelConfigYaml := GetOtelConfigYaml(t, valuesYaml, templatePath) diff --git a/tests/helm/metrics_test.go b/tests/helm/metrics_test.go index e04869558f..2f6d6f8c86 100644 --- a/tests/helm/metrics_test.go +++ b/tests/helm/metrics_test.go @@ -137,7 +137,6 @@ func TestMetadataMetricsOtelConfigExtraProcessors(t *testing.T) { "transform/remove_name", "filter/drop_unnecessary_metrics", "batch", - "routing", } require.Equal(t, expectedPipelineValue, otelConfig.Service.Pipelines.Metrics.Processors) @@ -180,12 +179,62 @@ sumologic: assert.Equal(t, otelConfig.Exporters.Default.Endpoint, "${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE}") assert.Len(t, otelConfig.Exporters.Rest, 0) assert.NotContains(t, otelConfig.Processors, "routing") - assert.NotContains(t, otelConfig.Processors, "transform/prepare_routing") assert.NotContains(t, otelConfig.Service.Pipelines.Metrics.Processors, "routing") - assert.NotContains(t, otelConfig.Service.Pipelines.Metrics.Processors, "transform/prepare_routing") assert.Equal(t, otelConfig.Service.Pipelines.Metrics.Exporters, []string{"sumologic/default"}) } +func TestMetadataSourceTypeHTTP(t *testing.T) { + t.Parallel() + templatePath := "templates/metrics/otelcol/configmap.yaml" + + type OtelConfig struct { + Exporters map[string]struct { + MetricFormat string `yaml:"metric_format"` + Endpoint string + } `yaml:"exporters"` + Processors map[string]interface{} + Service struct { + Pipelines struct { + Metrics struct { + Processors []string `yaml:"processors"` + Exporters []string `yaml:"exporters"` + } + } + } + } + + var otelConfig OtelConfig + valuesYaml := ` +sumologic: + metrics: + sourceType: http +` + otelConfigYaml := GetOtelConfigYaml(t, valuesYaml, templatePath) + err := yaml.Unmarshal([]byte(otelConfigYaml), &otelConfig) + require.NoError(t, err) + + require.Contains(t, otelConfig.Exporters, "sumologic/default") + defaultExporter := otelConfig.Exporters["sumologic/default"] + assert.Equal(t, "prometheus", defaultExporter.MetricFormat) + assert.Equal(t, "${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE}", defaultExporter.Endpoint) + assert.Contains(t, otelConfig.Processors, "routing") + assert.Contains(t, otelConfig.Service.Pipelines.Metrics.Processors, "routing") + assert.Equal( + t, + []string{ + "sumologic/default", + "sumologic/apiserver", + "sumologic/control_plane", + "sumologic/controller", + "sumologic/kubelet", + "sumologic/node", + "sumologic/scheduler", + "sumologic/state", + }, + otelConfig.Service.Pipelines.Metrics.Exporters, + ) +} + func TestNoPrometheusServiceMonitors(t *testing.T) { t.Parallel() allTemplatePaths := []string{ diff --git a/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml index f6bd9bec33..85c706b3dd 100644 --- a/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml @@ -15,8 +15,8 @@ data: exporters: sumologic: clear_logs_timestamp: false - endpoint: ${SUMO_ENDPOINT_DEFAULT_EVENTS_SOURCE} - log_format: json + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_EVENTS_SOURCE} + log_format: otlp sending_queue: enabled: true storage: file_storage diff --git a/tests/helm/testdata/goldenfile/events_otc/options.output.yaml b/tests/helm/testdata/goldenfile/events_otc/options.output.yaml index e1e17ac6bc..05ddec2cf4 100644 --- a/tests/helm/testdata/goldenfile/events_otc/options.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc/options.output.yaml @@ -15,8 +15,8 @@ data: exporters: sumologic: clear_logs_timestamp: false - endpoint: ${SUMO_ENDPOINT_DEFAULT_EVENTS_SOURCE} - log_format: json + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_EVENTS_SOURCE} + log_format: otlp sending_queue: enabled: true extensions: diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml index 0853117a9a..266e79163d 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml @@ -126,6 +126,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-events + - name: SUMO_ENDPOINT_DEFAULT_OTLP_EVENTS_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-events-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.input.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.input.yaml index d57b6132d4..80042a5666 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.input.yaml @@ -1,6 +1,6 @@ sumologic: events: - sourceType: otlp + sourceType: http podAnnotations: sumoAnnotation: sumoValue podLabels: diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml index cf961cf327..c6ee838739 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml @@ -114,11 +114,6 @@ spec: secretKeyRef: name: sumologic key: endpoint-events - - name: SUMO_ENDPOINT_DEFAULT_OTLP_EVENTS_SOURCE - valueFrom: - secretKeyRef: - name: sumologic - key: endpoint-events-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml index 136d5815fc..0251a066f4 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml @@ -110,6 +110,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-events + - name: SUMO_ENDPOINT_DEFAULT_OTLP_EVENTS_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-events-otlp - name: HTTP_PROXY value: http://proxy.internal diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml index 6723fe8893..728078af22 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml @@ -13,21 +13,10 @@ metadata: data: config.yaml: | exporters: - sumologic/containers: - endpoint: ${SUMO_ENDPOINT_DEFAULT_LOGS_SOURCE} - json_logs: - add_timestamp: false - log_format: json - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - sumologic/systemd: - endpoint: ${SUMO_ENDPOINT_DEFAULT_LOGS_SOURCE} - json_logs: - add_timestamp: false - log_format: json + sumologic: + clear_logs_timestamp: false + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_LOGS_SOURCE} + log_format: otlp sending_queue: enabled: true num_consumers: 10 @@ -291,7 +280,7 @@ data: pipelines: logs/otlp/containers: exporters: - - sumologic/containers + - sumologic processors: - memory_limiter - filter/include_containers @@ -311,7 +300,7 @@ data: - otlp logs/otlp/kubelet: exporters: - - sumologic/systemd + - sumologic processors: - memory_limiter - filter/include_fluent_tag_host @@ -333,7 +322,7 @@ data: - otlp logs/otlp/systemd: exporters: - - sumologic/systemd + - sumologic processors: - memory_limiter - filter/include_fluent_tag_host diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml index 362ce2ceb5..f734263d18 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml @@ -13,21 +13,10 @@ metadata: data: config.yaml: | exporters: - sumologic/containers: - endpoint: ${SUMO_ENDPOINT_DEFAULT_LOGS_SOURCE} - json_logs: - add_timestamp: false - log_format: json - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - sumologic/systemd: - endpoint: ${SUMO_ENDPOINT_DEFAULT_LOGS_SOURCE} - json_logs: - add_timestamp: false - log_format: json + sumologic: + clear_logs_timestamp: false + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_LOGS_SOURCE} + log_format: otlp sending_queue: enabled: true num_consumers: 10 @@ -318,7 +307,7 @@ data: pipelines: logs/otlp/containers: exporters: - - sumologic/containers + - sumologic processors: - memory_limiter - filter/include_containers @@ -340,7 +329,7 @@ data: - otlp logs/otlp/kubelet: exporters: - - sumologic/systemd + - sumologic processors: - memory_limiter - filter/include_fluent_tag_host @@ -364,7 +353,7 @@ data: - otlp logs/otlp/systemd: exporters: - - sumologic/systemd + - sumologic processors: - memory_limiter - filter/include_fluent_tag_host diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml index db62bc9544..e97ddadcb2 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml @@ -98,6 +98,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-logs + - name: SUMO_ENDPOINT_DEFAULT_OTLP_LOGS_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-logs-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.input.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.input.yaml index edf15f18e0..edd96a1538 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.input.yaml @@ -1,6 +1,6 @@ sumologic: logs: - sourceType: otlp + sourceType: http metadata: image: diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml index c36ccdfb66..097d50217e 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml @@ -122,11 +122,6 @@ spec: secretKeyRef: name: sumologic key: endpoint-logs - - name: SUMO_ENDPOINT_DEFAULT_OTLP_LOGS_SOURCE - valueFrom: - secretKeyRef: - name: sumologic - key: endpoint-logs-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml index 3b4509a825..5e3055ddc6 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml @@ -13,81 +13,11 @@ metadata: data: config.yaml: | exporters: - sumologic/apiserver: - endpoint: ${SUMO_ENDPOINT_APISERVER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/control_plane: - endpoint: ${SUMO_ENDPOINT_CONTROL_PLANE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/controller: - endpoint: ${SUMO_ENDPOINT_CONTROLLER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s sumologic/default: decompose_otlp_histograms: true - endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/kubelet: - endpoint: ${SUMO_ENDPOINT_KUBELET_METRICS_SOURCE} + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE} max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/node: - endpoint: ${SUMO_ENDPOINT_NODE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/scheduler: - endpoint: ${SUMO_ENDPOINT_SCHEDULER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/state: - endpoint: ${SUMO_ENDPOINT_STATE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus + metric_format: otlp sending_queue: enabled: true num_consumers: 10 @@ -201,35 +131,6 @@ data: attributes: - action: delete key: k8s.pod.pod_name - routing: - default_exporters: - - sumologic/default - error_mode: ignore - table: - - exporters: - - sumologic/apiserver - statement: route() where resource.attributes["job"] == "apiserver" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "coredns" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "kube-etcd" - - exporters: - - sumologic/controller - statement: route() where resource.attributes["job"] == "kube-controller-manager" - - exporters: - - sumologic/kubelet - statement: route() where resource.attributes["job"] == "kubelet" - - exporters: - - sumologic/node - statement: route() where resource.attributes["job"] == "node-exporter" - - exporters: - - sumologic/scheduler - statement: route() where resource.attributes["job"] == "kube-scheduler" - - exporters: - - sumologic/state - statement: route() where resource.attributes["job"] == "kube-state-metrics" source: collector: kubernetes exclude: @@ -279,13 +180,6 @@ data: metrics: exporters: - sumologic/default - - sumologic/apiserver - - sumologic/control_plane - - sumologic/controller - - sumologic/kubelet - - sumologic/node - - sumologic/scheduler - - sumologic/state processors: - memory_limiter - metricstransform @@ -301,7 +195,6 @@ data: - transform/remove_name - filter/drop_unnecessary_metrics - batch - - routing receivers: - telegraf - otlp diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml index ef38dc4eb4..85df3500e1 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml @@ -13,81 +13,11 @@ metadata: data: config.yaml: | exporters: - sumologic/apiserver: - endpoint: ${SUMO_ENDPOINT_APISERVER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/control_plane: - endpoint: ${SUMO_ENDPOINT_CONTROL_PLANE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/controller: - endpoint: ${SUMO_ENDPOINT_CONTROLLER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s sumologic/default: decompose_otlp_histograms: true - endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/kubelet: - endpoint: ${SUMO_ENDPOINT_KUBELET_METRICS_SOURCE} + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE} max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/node: - endpoint: ${SUMO_ENDPOINT_NODE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/scheduler: - endpoint: ${SUMO_ENDPOINT_SCHEDULER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/state: - endpoint: ${SUMO_ENDPOINT_STATE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus + metric_format: otlp sending_queue: enabled: true num_consumers: 10 @@ -201,35 +131,6 @@ data: attributes: - action: delete key: k8s.pod.pod_name - routing: - default_exporters: - - sumologic/default - error_mode: ignore - table: - - exporters: - - sumologic/apiserver - statement: route() where resource.attributes["job"] == "apiserver" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "coredns" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "kube-etcd" - - exporters: - - sumologic/controller - statement: route() where resource.attributes["job"] == "kube-controller-manager" - - exporters: - - sumologic/kubelet - statement: route() where resource.attributes["job"] == "kubelet" - - exporters: - - sumologic/node - statement: route() where resource.attributes["job"] == "node-exporter" - - exporters: - - sumologic/scheduler - statement: route() where resource.attributes["job"] == "kube-scheduler" - - exporters: - - sumologic/state - statement: route() where resource.attributes["job"] == "kube-state-metrics" source: collector: kubernetes exclude: @@ -277,13 +178,6 @@ data: metrics: exporters: - sumologic/default - - sumologic/apiserver - - sumologic/control_plane - - sumologic/controller - - sumologic/kubelet - - sumologic/node - - sumologic/scheduler - - sumologic/state processors: - memory_limiter - metricstransform @@ -299,7 +193,6 @@ data: - transform/remove_name - filter/drop_unnecessary_metrics - batch - - routing receivers: - telegraf - otlp diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.input.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.input.yaml index 19eb873f99..750aba7002 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.input.yaml @@ -1,3 +1,3 @@ sumologic: metrics: - sourceType: otlp + sourceType: http diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml index 85df3500e1..ef38dc4eb4 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml @@ -13,11 +13,81 @@ metadata: data: config.yaml: | exporters: + sumologic/apiserver: + endpoint: ${SUMO_ENDPOINT_APISERVER_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/control_plane: + endpoint: ${SUMO_ENDPOINT_CONTROL_PLANE_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/controller: + endpoint: ${SUMO_ENDPOINT_CONTROLLER_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s sumologic/default: decompose_otlp_histograms: true - endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE} + endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/kubelet: + endpoint: ${SUMO_ENDPOINT_KUBELET_METRICS_SOURCE} max_request_body_size: 16777216 - metric_format: otlp + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/node: + endpoint: ${SUMO_ENDPOINT_NODE_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/scheduler: + endpoint: ${SUMO_ENDPOINT_SCHEDULER_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + sumologic/state: + endpoint: ${SUMO_ENDPOINT_STATE_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: prometheus sending_queue: enabled: true num_consumers: 10 @@ -131,6 +201,35 @@ data: attributes: - action: delete key: k8s.pod.pod_name + routing: + default_exporters: + - sumologic/default + error_mode: ignore + table: + - exporters: + - sumologic/apiserver + statement: route() where resource.attributes["job"] == "apiserver" + - exporters: + - sumologic/control_plane + statement: route() where resource.attributes["job"] == "coredns" + - exporters: + - sumologic/control_plane + statement: route() where resource.attributes["job"] == "kube-etcd" + - exporters: + - sumologic/controller + statement: route() where resource.attributes["job"] == "kube-controller-manager" + - exporters: + - sumologic/kubelet + statement: route() where resource.attributes["job"] == "kubelet" + - exporters: + - sumologic/node + statement: route() where resource.attributes["job"] == "node-exporter" + - exporters: + - sumologic/scheduler + statement: route() where resource.attributes["job"] == "kube-scheduler" + - exporters: + - sumologic/state + statement: route() where resource.attributes["job"] == "kube-state-metrics" source: collector: kubernetes exclude: @@ -178,6 +277,13 @@ data: metrics: exporters: - sumologic/default + - sumologic/apiserver + - sumologic/control_plane + - sumologic/controller + - sumologic/kubelet + - sumologic/node + - sumologic/scheduler + - sumologic/state processors: - memory_limiter - metricstransform @@ -193,6 +299,7 @@ data: - transform/remove_name - filter/drop_unnecessary_metrics - batch + - routing receivers: - telegraf - otlp diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml index e35fd881f0..9223239438 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml @@ -13,81 +13,11 @@ metadata: data: config.yaml: | exporters: - sumologic/apiserver: - endpoint: ${SUMO_ENDPOINT_APISERVER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/control_plane: - endpoint: ${SUMO_ENDPOINT_CONTROL_PLANE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/controller: - endpoint: ${SUMO_ENDPOINT_CONTROLLER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s sumologic/default: decompose_otlp_histograms: true - endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/kubelet: - endpoint: ${SUMO_ENDPOINT_KUBELET_METRICS_SOURCE} + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE} max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/node: - endpoint: ${SUMO_ENDPOINT_NODE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/scheduler: - endpoint: ${SUMO_ENDPOINT_SCHEDULER_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus - sending_queue: - enabled: true - num_consumers: 10 - queue_size: 10000 - storage: file_storage - timeout: 30s - sumologic/state: - endpoint: ${SUMO_ENDPOINT_STATE_METRICS_SOURCE} - max_request_body_size: 16777216 - metric_format: prometheus + metric_format: otlp sending_queue: enabled: true num_consumers: 10 @@ -225,35 +155,6 @@ data: attributes: - action: delete key: k8s.pod.pod_name - routing: - default_exporters: - - sumologic/default - error_mode: ignore - table: - - exporters: - - sumologic/apiserver - statement: route() where resource.attributes["job"] == "apiserver" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "coredns" - - exporters: - - sumologic/control_plane - statement: route() where resource.attributes["job"] == "kube-etcd" - - exporters: - - sumologic/controller - statement: route() where resource.attributes["job"] == "kube-controller-manager" - - exporters: - - sumologic/kubelet - statement: route() where resource.attributes["job"] == "kubelet" - - exporters: - - sumologic/node - statement: route() where resource.attributes["job"] == "node-exporter" - - exporters: - - sumologic/scheduler - statement: route() where resource.attributes["job"] == "kube-scheduler" - - exporters: - - sumologic/state - statement: route() where resource.attributes["job"] == "kube-state-metrics" source: collector: kubernetes exclude: @@ -301,13 +202,6 @@ data: metrics: exporters: - sumologic/default - - sumologic/apiserver - - sumologic/control_plane - - sumologic/controller - - sumologic/kubelet - - sumologic/node - - sumologic/scheduler - - sumologic/state processors: - memory_limiter - metricstransform @@ -324,7 +218,6 @@ data: - filter/drop_unnecessary_metrics - filter/app_metrics - batch - - routing receivers: - telegraf - otlp diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml index b2a15b2c46..dafcc2e730 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml @@ -132,6 +132,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-metrics + - name: SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-metrics-otlp - name: SUMO_ENDPOINT_KUBELET_METRICS_SOURCE valueFrom: secretKeyRef: diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.input.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.input.yaml index 33b0d8ccc6..103c3be078 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.input.yaml @@ -1,6 +1,6 @@ sumologic: metrics: - sourceType: otlp + sourceType: http metadata: image: repository: my_repository diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml index 9bb4e9cefc..d0a6cb25d0 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml @@ -148,11 +148,6 @@ spec: secretKeyRef: name: sumologic key: endpoint-metrics - - name: SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE - valueFrom: - secretKeyRef: - name: sumologic - key: endpoint-metrics-otlp - name: SUMO_ENDPOINT_KUBELET_METRICS_SOURCE valueFrom: secretKeyRef: diff --git a/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml index 2aebc3f28a..8fee76b063 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml @@ -48,6 +48,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-traces + - name: SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-traces-otlp - name: SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE valueFrom: diff --git a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.input.yaml b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.input.yaml index 193911e475..32cd5fe67e 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.input.yaml @@ -1,6 +1,6 @@ sumologic: traces: - sourceType: otlp + sourceType: http tracesGateway: deployment: diff --git a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml index 287ffc56db..e31aa0e671 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml @@ -48,11 +48,6 @@ spec: secretKeyRef: name: sumologic key: endpoint-traces - - name: SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE - valueFrom: - secretKeyRef: - name: sumologic - key: endpoint-traces-otlp - name: SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE valueFrom: diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml index d0cbdf8440..6e94df2659 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml @@ -42,6 +42,11 @@ spec: secretKeyRef: name: sumologic key: endpoint-traces + - name: SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE + valueFrom: + secretKeyRef: + name: sumologic + key: endpoint-traces-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.input.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.input.yaml index 998cea5a35..330ba2d398 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.input.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.input.yaml @@ -1,6 +1,6 @@ sumologic: traces: - sourceType: otlp + sourceType: http tracesSampler: deployment: diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml index 331dd4892a..1970bed76b 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml @@ -42,11 +42,6 @@ spec: secretKeyRef: name: sumologic key: endpoint-traces - - name: SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE - valueFrom: - secretKeyRef: - name: sumologic - key: endpoint-traces-otlp - name: NO_PROXY value: kubernetes.default.svc diff --git a/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml index 4ac84c2ade..ffca5a12c3 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml @@ -15,7 +15,7 @@ data: exporters: otlphttp: compression: gzip - traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE} + traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE}/v1/traces extensions: health_check: {} memory_ballast: diff --git a/tests/integration/helm_otlp_test.go b/tests/integration/helm_http_source_test.go similarity index 96% rename from tests/integration/helm_otlp_test.go rename to tests/integration/helm_http_source_test.go index 3394915fd2..47f4a9dc1c 100644 --- a/tests/integration/helm_otlp_test.go +++ b/tests/integration/helm_http_source_test.go @@ -9,7 +9,7 @@ import ( "github.com/SumoLogic/sumologic-kubernetes-collection/tests/integration/internal" ) -func Test_Helm_OTLP(t *testing.T) { +func Test_Helm_Http_Source(t *testing.T) { expectedMetrics := internal.DefaultExpectedMetrics // we have tracing enabled, so check tracing-specific metrics expectedMetrics = append(expectedMetrics, internal.TracingOtelcolMetrics...) diff --git a/tests/integration/values/values_common.yaml b/tests/integration/values/values_common.yaml index ba04b0c48e..c89271c8fa 100644 --- a/tests/integration/values/values_common.yaml +++ b/tests/integration/values/values_common.yaml @@ -85,11 +85,6 @@ otelcol: # Request less resources so that this fits on Github actions runners environment tracesSampler: - config: - # Default otlp pipeline from values.yaml is used. - exporters: - otlphttp: - traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE}/v1/traces deployment: replicas: 1 resources: diff --git a/tests/integration/values/values_helm_http_source.yaml b/tests/integration/values/values_helm_http_source.yaml new file mode 100644 index 0000000000..030b28cd9b --- /dev/null +++ b/tests/integration/values/values_helm_http_source.yaml @@ -0,0 +1,15 @@ +sumologic: + metrics: + sourceType: http + events: + sourceType: http + logs: + sourceType: http + traces: + sourceType: http + +tracesSampler: + config: + exporters: + otlphttp: + traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE}/v1/traces diff --git a/tests/integration/values/values_helm_otlp.yaml b/tests/integration/values/values_helm_otlp.yaml deleted file mode 100644 index 23b16538c9..0000000000 --- a/tests/integration/values/values_helm_otlp.yaml +++ /dev/null @@ -1,15 +0,0 @@ -sumologic: - metrics: - sourceType: otlp - events: - sourceType: otlp - logs: - sourceType: otlp - traces: - sourceType: otlp - -tracesSampler: - config: - exporters: - otlphttp: - traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_TRACES_SOURCE}/v1/traces