Skip to content

Commit

Permalink
Customize config for Splunk Observability (open-telemetry#12)
Browse files Browse the repository at this point in the history
Adding support to setup 2 environment variables to pass token and realm:
- SPLUNK_ACCESS_TOKEN - user must configer their token
- SPLUNK_REALM - user must configer their realm

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
Bogdan Drutu committed Sep 30, 2020
1 parent 77aca53 commit 84ce02a
Showing 1 changed file with 41 additions and 27 deletions.
68 changes: 41 additions & 27 deletions cmd/otelcol/config.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,69 @@
extensions:
health_check:
pprof:
endpoint: 0.0.0.0:1777
zpages:
endpoint: 0.0.0.0:55679

receivers:
otlp:
protocols:
grpc:
http:

opencensus:

# Collect own metrics
# This section is used to collect the OpenTelemetry Collector metrics
# Even if just a SignalFx µAPM customer, these metrics are included
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']

jaeger:
protocols:
grpc:
thrift_binary:
thrift_compact:
thrift_http:

metric_relabel_configs:
- source_labels: [ __name__ ]
regex: '.*grpc_io.*'
action: drop
sapm:
signalfx:
zipkin:

processors:
batch:
# Enabling the memory_limiter is strongly recommended for every pipeline.
# Configuration is based on the amount of memory allocated to the collector.
# The configuration below assumes 2GB of memory. 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 up to 2GB, and the spike should be 25% of the
# collector's memory up to 2GB. In addition, the "--mem-ballast-size-mib" CLI
# flag must be set to the same value as the "ballast_size_mib". For more
# information, see
# https://github.com/open-telemetry/opentelemetry-collector/blob/master/processor/memorylimiter/README.md
memory_limiter:
ballast_size_mib: 683
check_interval: 2s
limit_mib: 1800
spike_limit_mib: 500

exporters:
logging:
logLevel: debug
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
realm: "${SPLUNK_REALM}"

service:

pipelines:

traces:
receivers: [opencensus, jaeger, zipkin]
processors: [batch]
exporters: [logging]

receivers: [otlp, sapm, zipkin]
processors: [memory_limiter, batch]
exporters: [sapm]
metrics:
receivers: [otlp, opencensus, prometheus]
processors: [batch]
exporters: [logging]
receivers: [otlp, signalfx, prometheus]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]

extensions: [health_check, pprof, zpages]
extensions: [health_check, zpages]

0 comments on commit 84ce02a

Please sign in to comment.