From 914143f51a1101066d9fa91a1ac3e868fa538921 Mon Sep 17 00:00:00 2001 From: Derek Mitchell <137436963+dmitchsplunk@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:04:22 +0100 Subject: [PATCH 1/2] Update instrument-java-application.rst To send data directly from the Java 2.x agent to o11y cloud, we need to set OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc. --- .../java/instrumentation/instrument-java-application.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst b/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst index 9750f3b95..10d610180 100644 --- a/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst +++ b/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst @@ -259,11 +259,13 @@ If you need to send data directly to Splunk Observability Cloud, set the followi export SPLUNK_ACCESS_TOKEN= export SPLUNK_REALM= + export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc .. code-tab:: shell Windows PowerShell $env:SPLUNK_ACCESS_TOKEN= $env:SPLUNK_REALM= + $env:OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc To obtain an access token, see :ref:`admin-api-access-tokens`. From 32e45839d441ef021801b9c583ed97b85c62af22 Mon Sep 17 00:00:00 2001 From: Derek Mitchell <137436963+dmitchsplunk@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:34:27 +0100 Subject: [PATCH 2/2] Update instrument-java-application.rst Use http/protobuf instead of grpc when sending traces directly to o11y cloud. Also, disable log export when sending directly to o11y cloud to avoid errors. --- .../instrumentation/instrument-java-application.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst b/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst index 10d610180..075fbfdac 100644 --- a/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst +++ b/gdi/get-data-in/application/java/instrumentation/instrument-java-application.rst @@ -258,14 +258,16 @@ If you need to send data directly to Splunk Observability Cloud, set the followi .. code-tab:: bash Linux export SPLUNK_ACCESS_TOKEN= - export SPLUNK_REALM= - export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf + export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://ingest..signalfx.com/v2/trace/otlp + export OTEL_LOGS_EXPORTER=none .. code-tab:: shell Windows PowerShell $env:SPLUNK_ACCESS_TOKEN= - $env:SPLUNK_REALM= - $env:OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc + $env:OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf + $env:OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://ingest..signalfx.com/v2/trace/otlp + $env:OTEL_LOGS_EXPORTER=none To obtain an access token, see :ref:`admin-api-access-tokens`.