From 368c0a54928d11825b806ad4b1c290b047dc61e7 Mon Sep 17 00:00:00 2001 From: dmitchsplunk Date: Mon, 23 Dec 2024 08:37:34 -0800 Subject: [PATCH] updated otelcol config to align with the latest default config --- splunk/otelcol-config-filelog.yml | 54 ++++++++++++++----------------- splunk/otelcol-config-fluentd.yml | 54 ++++++++++++++----------------- splunk/otelcol-config.yml | 54 ++++++++++++++----------------- 3 files changed, 75 insertions(+), 87 deletions(-) diff --git a/splunk/otelcol-config-filelog.yml b/splunk/otelcol-config-filelog.yml index b82d495833..52efa08356 100644 --- a/splunk/otelcol-config-filelog.yml +++ b/splunk/otelcol-config-filelog.yml @@ -8,12 +8,6 @@ extensions: # TODO: Ensure this is set properly endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" zpages: - memory_ballast: - # In general, the ballast should be set to 1/3 of the collector's memory, the limit - # should be 90% of the collector's memory. - # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. - # TODO: Ensure this is set properly - size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: filelog: include: @@ -119,20 +113,21 @@ receivers: processors: batch: - # Optional: If you have a different environment tag name - # If this option is enabled it must be added to the pipeline section below - #attributes/copyfromexistingkey: - #actions: - #- key: environment - #from_attribute: YOUR_EXISTING_TAG_NAME - #action: upsert - # Optional: If you want to add an environment tag - # If this option is enabled it must be added to the pipeline section below - #attributes/newenvironment: - #actions: - #- key: environment - #value: "YOUR_ENVIRONMENT_NAME" - #action: insert + + # Enabling the memory_limiter is strongly recommended for every pipeline. + # Configuration is based on the amount of memory allocated to the collector. + # For more information about memory limiter, see + # https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiter/README.md + memory_limiter: + check_interval: 2s + limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB} + + resource/add_environment: + attributes: + - action: insert + value: test + key: deployment.environment + resourcedetection: detectors: - env @@ -142,11 +137,10 @@ processors: exporters: # Traces - sapm: - # TODO: Ensure this is set properly - access_token: "${SPLUNK_ACCESS_TOKEN}" - # TODO: Ensure this is set properly - endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + otlphttp: + traces_endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace/otlp" + headers: + "X-SF-Token": "${SPLUNK_ACCESS_TOKEN}" # Metrics signalfx: # TODO: Ensure this is set properly @@ -174,21 +168,23 @@ service: pipelines: traces: receivers: [otlp, sapm, zipkin] - processors: [batch, resourcedetection] - exporters: [ sapm, signalfx ] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] + exporters: [ otlphttp, signalfx ] metrics: receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [signalfx] logs: receivers: [otlp, signalfx, filelog] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [splunk_hec] metrics/additional-receivers: exporters: - signalfx processors: + - memory_limiter - batch - resourcedetection + - resource/add_environment receivers: - redis diff --git a/splunk/otelcol-config-fluentd.yml b/splunk/otelcol-config-fluentd.yml index 090f4bd3cc..a00c6e48bb 100644 --- a/splunk/otelcol-config-fluentd.yml +++ b/splunk/otelcol-config-fluentd.yml @@ -8,12 +8,6 @@ extensions: # TODO: Ensure this is set properly endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" zpages: - memory_ballast: - # In general, the ballast should be set to 1/3 of the collector's memory, the limit - # should be 90% of the collector's memory. - # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. - # TODO: Ensure this is set properly - size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: fluentforward: endpoint: 0.0.0.0:24224 @@ -72,20 +66,21 @@ receivers: processors: batch: - # Optional: If you have a different environment tag name - # If this option is enabled it must be added to the pipeline section below - #attributes/copyfromexistingkey: - #actions: - #- key: environment - #from_attribute: YOUR_EXISTING_TAG_NAME - #action: upsert - # Optional: If you want to add an environment tag - # If this option is enabled it must be added to the pipeline section below - #attributes/newenvironment: - #actions: - #- key: environment - #value: "YOUR_ENVIRONMENT_NAME" - #action: insert + + # Enabling the memory_limiter is strongly recommended for every pipeline. + # Configuration is based on the amount of memory allocated to the collector. + # For more information about memory limiter, see + # https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiter/README.md + memory_limiter: + check_interval: 2s + limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB} + + resource/add_environment: + attributes: + - action: insert + value: test + key: deployment.environment + resourcedetection: detectors: - env @@ -95,11 +90,10 @@ processors: exporters: # Traces - sapm: - # TODO: Ensure this is set properly - access_token: "${SPLUNK_ACCESS_TOKEN}" - # TODO: Ensure this is set properly - endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + otlphttp: + traces_endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace/otlp" + headers: + "X-SF-Token": "${SPLUNK_ACCESS_TOKEN}" # Metrics signalfx: # TODO: Ensure this is set properly @@ -126,21 +120,23 @@ service: pipelines: traces: receivers: [otlp, sapm, zipkin] - processors: [batch, resourcedetection] - exporters: [ sapm, signalfx ] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] + exporters: [ otlphttp, signalfx ] metrics: receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [signalfx] logs: receivers: [otlp, signalfx, fluentforward] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [splunk_hec] metrics/additional-receivers: exporters: - signalfx processors: + - memory_limiter - batch - resourcedetection + - resource/add_environment receivers: - redis diff --git a/splunk/otelcol-config.yml b/splunk/otelcol-config.yml index 9c45bfebae..3591199e29 100644 --- a/splunk/otelcol-config.yml +++ b/splunk/otelcol-config.yml @@ -8,12 +8,6 @@ extensions: # TODO: Ensure this is set properly endpoint: "https://api.${SPLUNK_REALM}.signalfx.com" zpages: - memory_ballast: - # In general, the ballast should be set to 1/3 of the collector's memory, the limit - # should be 90% of the collector's memory. - # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. - # TODO: Ensure this is set properly - size_mib: ${SPLUNK_BALLAST_SIZE_MIB} receivers: fluentforward: endpoint: 0.0.0.0:24224 @@ -72,20 +66,21 @@ receivers: processors: batch: - # Optional: If you have a different environment tag name - # If this option is enabled it must be added to the pipeline section below - #attributes/copyfromexistingkey: - #actions: - #- key: environment - #from_attribute: YOUR_EXISTING_TAG_NAME - #action: upsert - # Optional: If you want to add an environment tag - # If this option is enabled it must be added to the pipeline section below - #attributes/newenvironment: - #actions: - #- key: environment - #value: "YOUR_ENVIRONMENT_NAME" - #action: insert + + # Enabling the memory_limiter is strongly recommended for every pipeline. + # Configuration is based on the amount of memory allocated to the collector. + # For more information about memory limiter, see + # https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiter/README.md + memory_limiter: + check_interval: 2s + limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB} + + resource/add_environment: + attributes: + - action: insert + value: test + key: deployment.environment + resourcedetection: detectors: - env @@ -95,11 +90,10 @@ processors: exporters: # Traces - sapm: - # TODO: Ensure this is set properly - access_token: "${SPLUNK_ACCESS_TOKEN}" - # TODO: Ensure this is set properly - endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace" + otlphttp: + traces_endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace/otlp" + headers: + "X-SF-Token": "${SPLUNK_ACCESS_TOKEN}" # Metrics signalfx: # TODO: Ensure this is set properly @@ -127,21 +121,23 @@ service: pipelines: traces: receivers: [otlp, sapm, zipkin] - processors: [batch, resourcedetection] - exporters: [ sapm, signalfx ] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] + exporters: [ otlphttp, signalfx ] metrics: receivers: [otlp, signalfx, prometheus, hostmetrics] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [signalfx] logs: receivers: [otlp, signalfx, fluentforward] - processors: [batch, resourcedetection] + processors: [memory_limiter, batch, resourcedetection, resource/add_environment] exporters: [splunk_hec] metrics/additional-receivers: exporters: - signalfx processors: + - memory_limiter - batch - resourcedetection + - resource/add_environment receivers: - redis