mirror of
https://github.com/fosrl/newt.git
synced 2026-03-26 20:46:41 +00:00
fix: Update otel-collector.yaml to correct resource attribute checks and streamline processor/exporter configuration
This commit is contained in:
@@ -9,33 +9,36 @@ processors:
|
||||
check_interval: 5s
|
||||
limit_percentage: 80
|
||||
spike_limit_percentage: 25
|
||||
batch: {}
|
||||
transform/promote:
|
||||
metric_statements:
|
||||
- context: datapoint
|
||||
statements:
|
||||
- set(attributes["service_instance_id"], resource.attributes["service.instance.id"]) where IsMapKey(resource.attributes, "service.instance.id")
|
||||
- set(attributes["site_id"], resource.attributes["site_id"]) where IsMapKey(resource.attributes, "site_id")
|
||||
resourcedetection:
|
||||
detectors: [env, host]
|
||||
timeout: 5s
|
||||
batch: {}
|
||||
transform/promote:
|
||||
# optional, damit fehlende Keys nicht die Pipeline abbrechen:
|
||||
error_mode: ignore
|
||||
metric_statements:
|
||||
- context: datapoint
|
||||
statements:
|
||||
- set(attributes["service_instance_id"], resource.attributes["service.instance.id"]) where IsSet(resource.attributes["service.instance.id"])
|
||||
- set(attributes["site_id"], resource.attributes["site_id"]) where IsSet(resource.attributes["site_id"])
|
||||
|
||||
exporters:
|
||||
prometheus:
|
||||
endpoint: 0.0.0.0:8889
|
||||
send_timestamps: true
|
||||
prometheusremotewrite:
|
||||
# Replace with your remote_write endpoint (Mimir/Cortex/VictoriaMetrics/Thanos Receive)
|
||||
endpoint: http://mimir:9009/api/v1/push
|
||||
# Falls du kein Remote-Write-Ziel hast, kommentiere es aus:
|
||||
# prometheusremotewrite:
|
||||
# endpoint: http://mimir:9009/api/v1/push
|
||||
debug:
|
||||
verbosity: basic
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, resourcedetection, batch, transform/promote]
|
||||
exporters: [prometheus, prometheusremotewrite]
|
||||
processors: [memory_limiter, resourcedetection, transform/promote, batch]
|
||||
exporters: [prometheus] # , prometheusremotewrite
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, resourcedetection, batch]
|
||||
exporters: []
|
||||
|
||||
exporters: [debug]
|
||||
|
||||
Reference in New Issue
Block a user