categraf/conf/traces.yaml

115 lines
5.4 KiB
YAML
Raw Normal View History

2022-06-28 16:33:27 +08:00
# This is an example:
# receive spans from jaeger, send to jaeger and zipkin, with three extensions enabled.
# See factories we already supported:
# ./config/traces/components.go
# For more details, see the OpenTelemetry official docs:
# https://opentelemetry.io/docs/collector/configuration/
traces:
2022-06-28 20:11:39 +08:00
# set enable to true to start tracing
2022-06-29 07:49:46 +08:00
enable: false
2022-06-28 20:11:39 +08:00
# Extensions:
# provide capabilities that can be added to the Collector, but which do not require direct access to telemetry data
# and are not part of pipelines. They are also enabled within the service section.
#
# Categraf supports:
# pprof: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension
# health_check: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/healthcheckextension
# basicauth: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension
# jaegerremotesampling: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/jaegerremotesampling
2022-06-28 16:33:27 +08:00
extensions:
pprof:
endpoint: 0.0.0.0:1777
2022-06-28 20:11:39 +08:00
health_check:
#jaegerremotesampling:
# source:
# remote:
# endpoint: jaeger-collector:14250
#basicauth/server:
# htpasswd:
# file: .htpasswd
# inline: |
# ${BASIC_AUTH_USERNAME}:${BASIC_AUTH_PASSWORD}
#
#basicauth/client:
# client_auth:
# username: username
# password: password
2022-06-28 16:33:27 +08:00
2022-06-28 20:11:39 +08:00
# Receiver:
# which can be push or pull based, is how data gets into the Collector. Configuring a receiver does not enable it.
# Receivers are enabled via pipelines within the service section.
#
# Categraf supports:
# jaeger: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver
# zipkin: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver
# otlp: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver
# kafka: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkareceiver
2022-06-28 16:33:27 +08:00
receivers:
jaeger:
protocols:
thrift_http:
endpoint: 0.0.0.0:14268
2022-06-28 20:11:39 +08:00
# Processor:
# run on data between being received and being exported. Configuring a processor does not enable it.
# Processors are enabled via pipelines within the service section.
#
# Categraf supports:
# batch: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor
# attributes: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor
# resource: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor
# span: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanprocessor
# tailsampling: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor
2022-06-28 16:33:27 +08:00
processors:
2022-06-28 20:11:39 +08:00
batch/example:
send_batch_size: 1000
timeout: 10s
attributes/example:
actions:
- key: ident
value: categraf-01.bj
action: upsert
2022-06-28 16:33:27 +08:00
2022-06-28 20:11:39 +08:00
# Exporter:
# which can be push or pull based, is how you send data to one or more backends/destinations. Configuring an
# exporter does not enable it. Exporters are enabled via pipelines within the service section.
#
# Categraf supports:
# otlp: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter
# otlphttp: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter
# jaeger: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/jaegerexporter
# zipkin: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter
# kafka: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/kafkaexporter
# alibabacloudlogservice: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/alibabacloudlogserviceexporter
2022-06-28 16:33:27 +08:00
exporters:
jaeger:
endpoint: "127.0.0.1:14250"
tls:
insecure: true
zipkin:
endpoint: "http://127.0.0.1:9411/api/v2/spans"
2022-06-28 20:11:39 +08:00
# Service:
# used to configure what components are enabled in the Collector based on the configuration found in the receivers,
# processors, exporters, and extensions sections. If a component is configured, but not defined within the service
# section then it is not enabled. The service section consists of three sub-sections:
# - extensions: Extensions consist of a list of all extensions to enable.
# - pipelines: A pipeline consists of a set of receivers, processors and exporters.
# - telemetry: Telemetry is where the telemetry for the collector itself can be configured.
2022-06-28 16:33:27 +08:00
service:
2022-06-28 20:11:39 +08:00
extensions: [health_check, pprof]
2022-06-28 16:33:27 +08:00
pipelines:
traces:
receivers: [jaeger]
2022-06-28 20:11:39 +08:00
processors: [batch/example, attributes/example]
exporters: [jaeger, zipkin]
telemetry:
logs:
level: info
initial_fields:
service: my-instance