Files
grafana/devenv/frontend-service/configs/alloy/_databases.alloy
T
Josh Hunt abc1033b11 FS: Add prometheus metrics to dev stack (#109952)
* FS: Add prometheus metrics to dev stack

* remove comments
2025-08-28 11:02:09 +00:00

65 lines
1.1 KiB
Plaintext

//
// Metrics
prometheus.relabel "publish_metrics" {
rule {
action = "replace"
target_label = "instance"
replacement = constants.hostname
}
forward_to = [prometheus.remote_write.tilt_prom.receiver]
}
prometheus.remote_write "tilt_prom" {
endpoint {
url = "http://prometheus:9090/api/v1/write"
send_native_histograms = true
}
}
//
// Logs
loki.relabel "publish_logs" {
rule {
action = "replace"
target_label = "instance"
replacement = constants.hostname
}
forward_to = [loki.write.tilt_loki.receiver]
}
loki.write "tilt_loki" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
//
// Traces
otelcol.processor.transform "publish_traces" {
error_mode = "ignore"
trace_statements {
context = "resource"
statements = [
string.format(`set(attributes["instance"], "%s")`, constants.hostname),
]
}
output {
traces = [otelcol.exporter.otlp.tilt_tempo.input]
}
}
otelcol.exporter.otlp "tilt_tempo" {
client {
endpoint = "tempo:4317"
tls {
insecure = true
insecure_skip_verify = true
}
}
}