|
| 1 | +extensions: |
| 2 | + health_check: |
| 3 | + |
| 4 | +receivers: |
| 5 | + otlp: |
| 6 | + protocols: |
| 7 | + grpc: |
| 8 | + endpoint: "0.0.0.0:4317" |
| 9 | + http: |
| 10 | + endpoint: "0.0.0.0:4318" |
| 11 | + statsd: |
| 12 | + endpoint: "0.0.0.0:8125" |
| 13 | + aggregation_interval: 10s |
| 14 | + enable_metric_type: true |
| 15 | + redis: |
| 16 | + endpoint: "merginmaps-redis:6379" |
| 17 | + collection_interval: 10s |
| 18 | + #password: "${REDIS_PASSWORD}" |
| 19 | +processors: |
| 20 | + batch: |
| 21 | + transform: |
| 22 | + metric_statements: |
| 23 | + - context: metric |
| 24 | + statements: |
| 25 | + - set(name, "mergin_gunicorn_workers") where name == "app.gunicorn.workers" |
| 26 | + - set(name, "mergin_gunicorn_request_duration") where name == "app.gunicorn.request.duration" |
| 27 | + # these metrics are not working |
| 28 | + - set(name, "mergin_gunicorn_request_rate") where name == "app.gunicorn.requests" |
| 29 | + - set(name, "mergin_gunicorn_log_critical") where name == "gunicorn.log.critical" |
| 30 | + - set(name, "mergin_gunicorn_log_error") where name == "gunicorn.log.error" |
| 31 | + - set(name, "mergin_gunicorn_log_warning") where name == "gunicorn.log.warning" |
| 32 | + - set(name, "mergin_gunicorn_log_exception") where name == "gunicorn.log.exception" |
| 33 | + - set(name, "mergin_gunicorn_response_code_200") where name == "app.gunicorn.request.status.200" |
| 34 | + # log_statements: |
| 35 | + # - context: log |
| 36 | + # statements: |
| 37 | + # - set(attributes["service_name"], attributes["docker_id"]) |
| 38 | + # - set(resource.attributes["service.name"], attributes["docker_id"]) |
| 39 | +exporters: |
| 40 | + prometheus: |
| 41 | + endpoint: "0.0.0.0:8889" # The Collector will "host" metrics here |
| 42 | + resource_to_telemetry_conversion: |
| 43 | + enabled: true # Converts OTel resource attributes to Prometheus labels |
| 44 | + add_metric_suffixes: true |
| 45 | + otlp: |
| 46 | + endpoint: "merginmaps-tempo:4317" |
| 47 | + tls: |
| 48 | + insecure: true |
| 49 | +service: |
| 50 | + extensions: [health_check] |
| 51 | + telemetry: |
| 52 | + metrics: |
| 53 | + address: 0.0.0.0:8888 # This enables the /metrics port |
| 54 | + logs: |
| 55 | + level: "warn" |
| 56 | + pipelines: |
| 57 | + metrics: |
| 58 | + receivers: [otlp, statsd, redis] |
| 59 | + processors: [transform, batch] |
| 60 | + exporters: [prometheus] |
| 61 | + traces: |
| 62 | + receivers: [otlp] |
| 63 | + processors: [batch] |
| 64 | + exporters: [otlp] |
0 commit comments