receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:
  attributes:
    actions:
      - action: insert
        key: loki.attribute.labels
        value: [component, function, endpoint]
  resource:
    attributes:
      - action: insert
        key: loki.resource.labels
        value: [host.name, service.name, service.namespace]

exporters:
  otlp: # tempo
    endpoint: tempo:4317
    tls:
      insecure: true
  prometheusremotewrite:
    endpoint: http://prometheus.example.com:9411/api/prom/push
  loki:
    endpoint: http://loki:3100/loki/api/v1/push
    tls:
      insecure: true

extensions:
  health_check:
  # pprof:
  zpages:

service:
  extensions: [health_check, zpages]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheusremotewrite]
    logs:
      receivers: [otlp]
      processors: [batch, attributes, resource]
      exporters: [loki]