Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 83 additions & 10 deletions specification/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,96 @@ are required.
a deprecation warning and suggest an alternate method. For example:

```txt
jaeger-thrift-splunk trace exporter is deprecated and may be removed in a future major release. Use the default
OTLP exporter instead, or set the SPLUNK_REALM and SPLUNK_ACCESS_TOKEN environment variables to send
jaeger-thrift-splunk trace exporter is deprecated and may be removed in a future major release. Use the default
OTLP exporter instead, or set the SPLUNK_REALM and SPLUNK_ACCESS_TOKEN environment variables to send
telemetry directly to Splunk Observability Cloud.
```

- `OTEL_TRACES_SAMPLER`
- Distribution MUST default to `always_on`
(not OpenTelemetry default)

In addition to environment variables, other ways of defining configuration also exist:

- [Java System
Properties](https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html):
These properties MUST match the environment variables converting to lower
case and replacing underscores with hyphens or periods. For example:
system property `splunk.trace-response-header.enabled` is equivalent to environment
variable `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED`.
In addition to environment variables, other ways of defining configuration exist:

### File based configuration

OpenTelemetry's [declarative configuration](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/README.md#declarative-configuration)
SHOULD be supported via [`OTEL_EXPERIMENTAL_CONFIG_FILE`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk.md#via-otel_experimental_config_file)
environment variable.

In addition, Splunk specific configuration MUST have their own root-level
configuration block named `splunk`.

The following is a configuration blueprint covering the common values:

```yaml
distribution:
splunk:
profiling:
exporter:
otlp_http:
endpoint: "" # SPLUNK_PROFILER_LOGS_ENDPOINT
# always_on, cpu_profiler, memory_profiler, callgraphs may contain language specific key value pairs.
always_on:
cpu_profiler: # SPLUNK_PROFILER_ENABLED
sampling_interval: 10 # SPLUNK_PROFILER_CALL_STACK_INTERVAL
memory_profiler: # SPLUNK_PROFILER_MEMORY_ENABLED
callgraphs: # SPLUNK_SNAPSHOT_PROFILER_ENABLED

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callgraphs should be nested one level less. It should be sibling of always_on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed

sampling_interval: 10 # SPLUNK_SNAPSHOT_SAMPLING_INTERVAL
selection_probability: 0.01 # SPLUNK_SNAPSHOT_SELECTION_PROBABILITY
# Language specific configuration.
general:
# Language distro specific key-value pairs, e.g. for Node.js:
runtime_metrics:
collection_interval: 30000
nextjs_cardinality_reduction: true
autoinstrument_packages:
- "MyApiService"
- "MyOtherService"
tracer_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ""
headers:
- name: "X-SF-TOKEN"
- value: ""
meter_provider:
readers:
- periodic:
exporter:
otlp_http:
endpoint: ""
headers:
- name: "X-SF-TOKEN"
- value: ""
logger_provider:
processors:
- batch:
exporter:
otlp_http:
endpoint: ""
instrumentation/development:
js:
"@opentelemetry/instrumentation-http":
splunk_trace_response_header_enabled: true # SPLUNK_TRACE_RESPONSE_HEADER_ENABLED
splunk_capture_uri_parameters:
- "userId"
"@opentelemetry/instrumentation-redis":
splunk_include_command_args: true # SPLUNK_REDIS_INCLUDE_COMMAND_ARGS
"@opentelemetry/instrumentation-pg":
disabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@opentelemetry/instrumentation-pg":
disabled: true
"@opentelemetry/instrumentation-pg":
disabled: true
dotnet:
traces:
response_header_enabled: true # SPLUNK_TRACE_RESPONSE_HEADER_ENABLED

```

Splunk specific keys MUST have the `splunk_` prefix.

#### [Java SystemProperties](https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html)

These properties MUST match the environment variables converting to lower
case and replacing underscores with hyphens or periods. For example:
system property `splunk.trace-response-header.enabled` is equivalent to environment
variable `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED`.

### Snapshot Profiler

Expand Down