|
| 1 | +config_sources: |
| 2 | + env: |
| 3 | + defaults: |
| 4 | + HEROKU_DYNO_ID: "unset" |
| 5 | + HEROKU_APP_ID: "unset" |
| 6 | + HEROKU_APP_NAME: "unset" |
| 7 | + |
| 8 | +extensions: |
| 9 | + health_check: |
| 10 | + endpoint: 0.0.0.0:13133 |
| 11 | + http_forwarder: |
| 12 | + ingress: |
| 13 | + endpoint: 0.0.0.0:6060 |
| 14 | + egress: |
| 15 | + endpoint: "${SPLUNK_API_URL}" |
| 16 | + # Use instead when sending to gateway |
| 17 | + #endpoint: "${SPLUNK_GATEWAY_URL}" |
| 18 | + zpages: |
| 19 | + #endpoint: 0.0.0.0:55679 |
| 20 | + |
| 21 | +receivers: |
| 22 | + jaeger: |
| 23 | + protocols: |
| 24 | + grpc: |
| 25 | + endpoint: 0.0.0.0:14250 |
| 26 | + thrift_binary: |
| 27 | + endpoint: 0.0.0.0:6832 |
| 28 | + thrift_compact: |
| 29 | + endpoint: 0.0.0.0:6831 |
| 30 | + thrift_http: |
| 31 | + endpoint: 0.0.0.0:14268 |
| 32 | + otlp: |
| 33 | + protocols: |
| 34 | + grpc: |
| 35 | + endpoint: 0.0.0.0:4317 |
| 36 | + http: |
| 37 | + endpoint: 0.0.0.0:4318 |
| 38 | + # This section is used to collect the OpenTelemetry Collector metrics |
| 39 | + # Even if just a Splunk APM customer, these metrics are included |
| 40 | + prometheus/internal: |
| 41 | + config: |
| 42 | + scrape_configs: |
| 43 | + - job_name: 'otel-collector' |
| 44 | + scrape_interval: 10s |
| 45 | + static_configs: |
| 46 | + - targets: ['0.0.0.0:8888'] |
| 47 | + metric_relabel_configs: |
| 48 | + - source_labels: [ __name__ ] |
| 49 | + regex: '.*grpc_io.*' |
| 50 | + action: drop |
| 51 | + signalfx: |
| 52 | + endpoint: 0.0.0.0:9943 |
| 53 | + zipkin: |
| 54 | + endpoint: 0.0.0.0:9411 |
| 55 | + |
| 56 | +processors: |
| 57 | + batch: |
| 58 | + # Enabling the memory_limiter is strongly recommended for every pipeline. |
| 59 | + # Configuration is based on the amount of memory allocated to the collector. |
| 60 | + # In general, the ballast should be set to 1/3 of the collector's memory, the limit |
| 61 | + # should be 90% of the collector's memory up to 2GB. The simplest way to specify the |
| 62 | + # ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. Alternatively, the |
| 63 | + # --mem-ballast-size-mib command line flag can be passed and take priority. |
| 64 | + # For more information about memory limiter, see |
| 65 | + # https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiter/README.md |
| 66 | + memory_limiter: |
| 67 | + ballast_size_mib: ${SPLUNK_BALLAST_SIZE_MIB} |
| 68 | + check_interval: 2s |
| 69 | + limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB} |
| 70 | + attributes/heroku: |
| 71 | + actions: |
| 72 | + - action: insert |
| 73 | + key: dyno_id |
| 74 | + value: ${env:HEROKU_DYNO_ID} |
| 75 | + - action: insert |
| 76 | + key: app_id |
| 77 | + value: ${env:HEROKU_APP_ID} |
| 78 | + - action: insert |
| 79 | + key: app_name |
| 80 | + value: ${env:HEROKU_APP_NAME} |
| 81 | + metricstransform/heroku: |
| 82 | + transforms: |
| 83 | + - include: .* |
| 84 | + match_type: regexp |
| 85 | + action: update |
| 86 | + operations: |
| 87 | + - action: add_label |
| 88 | + new_label: dyno_id |
| 89 | + new_value: ${env:HEROKU_DYNO_ID} |
| 90 | + - action: add_label |
| 91 | + new_label: app_id |
| 92 | + new_value: ${env:HEROKU_APP_ID} |
| 93 | + - action: add_label |
| 94 | + new_label: app_name |
| 95 | + new_value: ${env:HEROKU_APP_NAME} |
| 96 | + # Optional: The following processor can be used to add a default "deployment.environment" attribute to the logs and |
| 97 | + # traces when it's not populated by instrumentation libraries. |
| 98 | + # If enabled, make sure to enable this processor in the pipeline below. |
| 99 | + #resource/add_environment: |
| 100 | + #attributes: |
| 101 | + #- action: insert |
| 102 | + #key: deployment.environment |
| 103 | + #value: staging/production/... |
| 104 | + |
| 105 | +exporters: |
| 106 | + # Traces |
| 107 | + sapm: |
| 108 | + access_token: "${SPLUNK_ACCESS_TOKEN}" |
| 109 | + endpoint: "${SPLUNK_TRACE_URL}" |
| 110 | + # Metrics + Events |
| 111 | + signalfx: |
| 112 | + access_token: "${SPLUNK_ACCESS_TOKEN}" |
| 113 | + api_url: "${SPLUNK_API_URL}" |
| 114 | + ingest_url: "${SPLUNK_INGEST_URL}" |
| 115 | + # Send to gateway |
| 116 | + #otlp: |
| 117 | + # endpoint: "${SPLUNK_GATEWAY_URL}:4317" |
| 118 | + # insecure: true |
| 119 | + # Debug |
| 120 | + logging: |
| 121 | + loglevel: debug |
| 122 | + |
| 123 | +service: |
| 124 | + extensions: [health_check, http_forwarder, zpages] |
| 125 | + pipelines: |
| 126 | + traces: |
| 127 | + receivers: [jaeger, otlp, zipkin] |
| 128 | + processors: |
| 129 | + - memory_limiter |
| 130 | + - batch |
| 131 | + - attributes/heroku |
| 132 | + #- resource/add_environment |
| 133 | + exporters: [sapm, signalfx] |
| 134 | + metrics: |
| 135 | + receivers: [otlp, signalfx] |
| 136 | + processors: [memory_limiter, batch, metricstransform/heroku] |
| 137 | + exporters: [signalfx] |
| 138 | + metrics/internal: |
| 139 | + receivers: [prometheus/internal] |
| 140 | + processors: [memory_limiter, batch, metricstransform/heroku] |
| 141 | + exporters: [signalfx] |
0 commit comments