Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Example

This example instruments a simple HTTP server-client application.

The application is configured to send spans and metrics to a local instance of the OpenTelemetry Collector, which propagates them to Splunk Observability Cloud.

Prerequisites

Usage

Run the OpenTelemetry Collector and Jaeger instance:

SPLUNK_ACCESS_TOKEN=<access_token> docker compose up -d

The value for SPLUNK_ACCESS_TOKEN can be found here. Reference: docs.

Run the instrumented application:

export OTEL_SERVICE_NAME="splunk-otel-go-example"
export OTEL_RESOURCE_ATTRIBUTES="deployment.environment=$(whoami)"
go run .

You can find the collected telemetry in:

Cleanup:

docker compose down