mirror of
https://github.com/fosrl/newt.git
synced 2026-03-26 20:46:41 +00:00
Add OpenTelemetry configuration and observability documentation
This commit is contained in:
41
examples/otel-collector.yaml
Normal file
41
examples/otel-collector.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
|
||||
processors:
|
||||
memory_limiter:
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, resourcedetection, batch, transform/promote]
|
||||
exporters: [prometheus, prometheusremotewrite]
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, resourcedetection, batch]
|
||||
exporters: []
|
||||
|
||||
11
examples/prometheus.yml
Normal file
11
examples/prometheus.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: newt
|
||||
static_configs:
|
||||
- targets: ["newt:2112"]
|
||||
- job_name: otel-collector
|
||||
static_configs:
|
||||
- targets: ["collector:8889"]
|
||||
|
||||
Reference in New Issue
Block a user