---
apiVersion: v1
kind: ConfigMap
metadata:
  name: collector-config
data:
  collector.yaml: |
    receivers:
      otlp:
        protocols: 
          grpc:

    processors:
      batch:
      batch/2:
        timeout: 2s
        send_batch_size: 1000
        send_batch_max_size: 1100
      cumulativetodelta:
              metrics:
                     - an_important_metric

    exporters:
      prometheus:
        endpoint: 0.0.0.0:8889
        resource_to_telemetry_conversion:
                enabled: true
        namespace: "testapp"
      logging:
        loglevel: debug

      prometheusremotewrite:
        namespace: "cshari"
        resource_to_telemetry_conversion:
                enabled: true
        endpoint: https://prometheus-prod-<your_grafana_prom>/api/prom/push
        tls:
           insecure: true
        headers:
         Authorization: "Basic <your_api_token>" 

    service:
      pipelines:
        metrics:
          receivers: [otlp]
          processors: [batch/2]
          exporters: [prometheus, prometheusremotewrite, logging]
