From 238078640b5264cdd5bccbc2185d425adbd44c8a Mon Sep 17 00:00:00 2001 From: "Erwin Vrolijk (technimad-splunk)" Date: Fri, 27 Mar 2026 16:04:06 +0100 Subject: [PATCH 1/2] logging exporter is deprecated --- .../5-exporters/1-otlphttp.md | 220 +++++++++--------- 1 file changed, 109 insertions(+), 111 deletions(-) diff --git a/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md b/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md index 35e0214afd..3a2c999570 100644 --- a/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md +++ b/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md @@ -14,9 +14,9 @@ We will also change the verbosity of the logging exporter to prevent the disk fr ```yaml {hl_lines="3-4"} exporters: - logging: - verbosity: normal - otlphttp/splunk: + debug: + verbosity: normal + otlphttp/splunk: ``` Next, we need to define the `metrics_endpoint` and configure the target URL. @@ -24,7 +24,7 @@ Next, we need to define the `metrics_endpoint` and configure the target URL. {{% notice style="note" %}} If you are an attendee at a Splunk-hosted workshop, the instance you are using has already been configured with a Realm environment variable. We will reference that environment variable in our configuration file. Otherwise, you will need to create a new environment variable and set the Realm e.g. -``` bash +```bash export REALM="us1" ``` @@ -36,10 +36,10 @@ The **otlphttp** exporter can also be configured to send traces and logs by defi ```yaml {hl_lines="5"} exporters: - logging: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp ``` By default, `gzip` compression is enabled for all endpoints. This can be disabled by setting `compression: none` in the exporter configuration. We will leave compression enabled for this workshop and accept the default as this is the most efficient way to send data. @@ -49,7 +49,7 @@ To send metrics to Splunk Observability Cloud, we need to use an Access Token. T {{% notice style="note" %}} If you are an attendee at a Splunk-hosted workshop, the instance you are using has already been configured with an Access Token (which has been set as an environment variable). We will reference that environment variable in our configuration file. Otherwise, you will need to create a new token and set it as an environment variable e.g. -``` bash +```bash export ACCESS_TOKEN= ``` @@ -59,12 +59,12 @@ The token is defined in the configuration file by inserting `X-SF-TOKEN: ${env:A ```yaml {hl_lines="6-8"} exporters: - logging: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp - headers: - X-SF-TOKEN: ${env:ACCESS_TOKEN} + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + headers: + X-SF-TOKEN: ${env:ACCESS_TOKEN} ``` ## Configuration Check-in @@ -82,110 +82,108 @@ Now that we've covered exporters, let's check our configuration changes: # See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks extensions: - health_check: - endpoint: 0.0.0.0:13133 - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 + health_check: + endpoint: 0.0.0.0:13133 + pprof: + endpoint: 0.0.0.0:1777 + zpages: + endpoint: 0.0.0.0:55679 receivers: - hostmetrics: - collection_interval: 10s - scrapers: - # CPU utilization metrics - cpu: - # Disk I/O metrics - disk: - # File System utilization metrics - filesystem: - # Memory utilization metrics - memory: - # Network interface I/O metrics & TCP connection metrics - network: - # CPU load metrics - load: - # Paging/Swap space utilization and I/O metrics - paging: - # Process count metrics - processes: - # Per process CPU, Memory and Disk I/O metrics. Disabled by default. - # process: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:4317 - http: - endpoint: 0.0.0.0:4318 - - opencensus: - endpoint: 0.0.0.0:55678 - - # Collect own metrics - prometheus/internal: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: ['0.0.0.0:8888'] - - jaeger: - protocols: - grpc: - endpoint: 0.0.0.0:14250 - thrift_binary: - endpoint: 0.0.0.0:6832 - thrift_compact: - endpoint: 0.0.0.0:6831 - thrift_http: - endpoint: 0.0.0.0:14268 - - zipkin: - endpoint: 0.0.0.0:9411 + hostmetrics: + collection_interval: 10s + scrapers: + # CPU utilization metrics + cpu: + # Disk I/O metrics + disk: + # File System utilization metrics + filesystem: + # Memory utilization metrics + memory: + # Network interface I/O metrics & TCP connection metrics + network: + # CPU load metrics + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Process count metrics + processes: + # Per process CPU, Memory and Disk I/O metrics. Disabled by default. + # process: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + opencensus: + endpoint: 0.0.0.0:55678 + + # Collect own metrics + prometheus/internal: + config: + scrape_configs: + - job_name: "otel-collector" + scrape_interval: 10s + static_configs: + - targets: ["0.0.0.0:8888"] + + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + + zipkin: + endpoint: 0.0.0.0:9411 processors: - batch: - resourcedetection/system: - detectors: [system] - system: - hostname_sources: [os] - resourcedetection/ec2: - detectors: [ec2] - attributes/conf: - actions: - - key: participant.name - action: insert - value: "INSERT_YOUR_NAME_HERE" + batch: + resourcedetection/system: + detectors: [system] + system: + hostname_sources: [os] + resourcedetection/ec2: + detectors: [ec2] + attributes/conf: + actions: + - key: participant.name + action: insert + value: "INSERT_YOUR_NAME_HERE" exporters: - debug: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp - headers: - X-SF-Token: ${env:ACCESS_TOKEN} + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + headers: + X-SF-Token: ${env:ACCESS_TOKEN} service: - - pipelines: - - traces: - receivers: [otlp, opencensus, jaeger, zipkin] - processors: [batch] - exporters: [debug] - - metrics: - receivers: [otlp, opencensus, prometheus] - processors: [batch] - exporters: [debug] - - logs: - receivers: [otlp] - processors: [batch] - exporters: [debug] - - extensions: [health_check, pprof, zpages] + pipelines: + traces: + receivers: [otlp, opencensus, jaeger, zipkin] + processors: [batch] + exporters: [debug] + + metrics: + receivers: [otlp, opencensus, prometheus] + processors: [batch] + exporters: [debug] + + logs: + receivers: [otlp] + processors: [batch] + exporters: [debug] + + extensions: [health_check, pprof, zpages] ``` {{% /tab %}} From 716f2365f97e8873c2f7f2aa6acf0e7834a6ab3c Mon Sep 17 00:00:00 2001 From: "Erwin Vrolijk (technimad-splunk)" Date: Mon, 30 Mar 2026 11:22:10 +0200 Subject: [PATCH 2/2] fix indentation --- .../5-exporters/1-otlphttp.md | 220 +++++++++--------- 1 file changed, 111 insertions(+), 109 deletions(-) diff --git a/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md b/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md index 3a2c999570..ce7088dad1 100644 --- a/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md +++ b/content/en/ninja-workshops/3-opentelemetry-collector-workshops/1-opentelemetry-collector/5-exporters/1-otlphttp.md @@ -14,9 +14,9 @@ We will also change the verbosity of the logging exporter to prevent the disk fr ```yaml {hl_lines="3-4"} exporters: - debug: - verbosity: normal - otlphttp/splunk: + debug: + verbosity: normal + otlphttp/splunk: ``` Next, we need to define the `metrics_endpoint` and configure the target URL. @@ -24,7 +24,7 @@ Next, we need to define the `metrics_endpoint` and configure the target URL. {{% notice style="note" %}} If you are an attendee at a Splunk-hosted workshop, the instance you are using has already been configured with a Realm environment variable. We will reference that environment variable in our configuration file. Otherwise, you will need to create a new environment variable and set the Realm e.g. -```bash +``` bash export REALM="us1" ``` @@ -36,10 +36,10 @@ The **otlphttp** exporter can also be configured to send traces and logs by defi ```yaml {hl_lines="5"} exporters: - debug: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp ``` By default, `gzip` compression is enabled for all endpoints. This can be disabled by setting `compression: none` in the exporter configuration. We will leave compression enabled for this workshop and accept the default as this is the most efficient way to send data. @@ -49,7 +49,7 @@ To send metrics to Splunk Observability Cloud, we need to use an Access Token. T {{% notice style="note" %}} If you are an attendee at a Splunk-hosted workshop, the instance you are using has already been configured with an Access Token (which has been set as an environment variable). We will reference that environment variable in our configuration file. Otherwise, you will need to create a new token and set it as an environment variable e.g. -```bash +``` bash export ACCESS_TOKEN= ``` @@ -59,12 +59,12 @@ The token is defined in the configuration file by inserting `X-SF-TOKEN: ${env:A ```yaml {hl_lines="6-8"} exporters: - debug: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp - headers: - X-SF-TOKEN: ${env:ACCESS_TOKEN} + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + headers: + X-SF-TOKEN: ${env:ACCESS_TOKEN} ``` ## Configuration Check-in @@ -82,108 +82,110 @@ Now that we've covered exporters, let's check our configuration changes: # See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks extensions: - health_check: - endpoint: 0.0.0.0:13133 - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 + health_check: + endpoint: 0.0.0.0:13133 + pprof: + endpoint: 0.0.0.0:1777 + zpages: + endpoint: 0.0.0.0:55679 receivers: - hostmetrics: - collection_interval: 10s - scrapers: - # CPU utilization metrics - cpu: - # Disk I/O metrics - disk: - # File System utilization metrics - filesystem: - # Memory utilization metrics - memory: - # Network interface I/O metrics & TCP connection metrics - network: - # CPU load metrics - load: - # Paging/Swap space utilization and I/O metrics - paging: - # Process count metrics - processes: - # Per process CPU, Memory and Disk I/O metrics. Disabled by default. - # process: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:4317 - http: - endpoint: 0.0.0.0:4318 - - opencensus: - endpoint: 0.0.0.0:55678 - - # Collect own metrics - prometheus/internal: - config: - scrape_configs: - - job_name: "otel-collector" - scrape_interval: 10s - static_configs: - - targets: ["0.0.0.0:8888"] - - jaeger: - protocols: - grpc: - endpoint: 0.0.0.0:14250 - thrift_binary: - endpoint: 0.0.0.0:6832 - thrift_compact: - endpoint: 0.0.0.0:6831 - thrift_http: - endpoint: 0.0.0.0:14268 - - zipkin: - endpoint: 0.0.0.0:9411 + hostmetrics: + collection_interval: 10s + scrapers: + # CPU utilization metrics + cpu: + # Disk I/O metrics + disk: + # File System utilization metrics + filesystem: + # Memory utilization metrics + memory: + # Network interface I/O metrics & TCP connection metrics + network: + # CPU load metrics + load: + # Paging/Swap space utilization and I/O metrics + paging: + # Process count metrics + processes: + # Per process CPU, Memory and Disk I/O metrics. Disabled by default. + # process: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + + opencensus: + endpoint: 0.0.0.0:55678 + + # Collect own metrics + prometheus/internal: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:8888'] + + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_binary: + endpoint: 0.0.0.0:6832 + thrift_compact: + endpoint: 0.0.0.0:6831 + thrift_http: + endpoint: 0.0.0.0:14268 + + zipkin: + endpoint: 0.0.0.0:9411 processors: - batch: - resourcedetection/system: - detectors: [system] - system: - hostname_sources: [os] - resourcedetection/ec2: - detectors: [ec2] - attributes/conf: - actions: - - key: participant.name - action: insert - value: "INSERT_YOUR_NAME_HERE" + batch: + resourcedetection/system: + detectors: [system] + system: + hostname_sources: [os] + resourcedetection/ec2: + detectors: [ec2] + attributes/conf: + actions: + - key: participant.name + action: insert + value: "INSERT_YOUR_NAME_HERE" exporters: - debug: - verbosity: normal - otlphttp/splunk: - metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp - headers: - X-SF-Token: ${env:ACCESS_TOKEN} + debug: + verbosity: normal + otlphttp/splunk: + metrics_endpoint: https://ingest.${env:REALM}.signalfx.com/v2/datapoint/otlp + headers: + X-SF-Token: ${env:ACCESS_TOKEN} service: - pipelines: - traces: - receivers: [otlp, opencensus, jaeger, zipkin] - processors: [batch] - exporters: [debug] - - metrics: - receivers: [otlp, opencensus, prometheus] - processors: [batch] - exporters: [debug] - - logs: - receivers: [otlp] - processors: [batch] - exporters: [debug] - - extensions: [health_check, pprof, zpages] + + pipelines: + + traces: + receivers: [otlp, opencensus, jaeger, zipkin] + processors: [batch] + exporters: [debug] + + metrics: + receivers: [otlp, opencensus, prometheus] + processors: [batch] + exporters: [debug] + + logs: + receivers: [otlp] + processors: [batch] + exporters: [debug] + + extensions: [health_check, pprof, zpages] ``` {{% /tab %}}