Add observability stack: Alloy, Tempo, and OTEL support
- Add NixOS modules for Alloy and Tempo with default configs - Update Grafana datasource config for Prometheus, Loki, Tempo - Add Prometheus remote_write for Alloy - Implement OTEL metrics/tracing/logging in arrtrix (Go) - Enable Alloy and Tempo in ulmo system config
This commit is contained in:
parent
81f34676c4
commit
9b93f017b6
9 changed files with 661 additions and 19 deletions
22
packages/arrtrix/pkg/observability/config.go
Normal file
22
packages/arrtrix/pkg/observability/config.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package observability
|
||||
|
||||
import "strings"
|
||||
|
||||
type Config struct {
|
||||
OTLPGRPCEndpoint string `yaml:"otlp_grpc_endpoint"`
|
||||
ServiceName string `yaml:"service_name"`
|
||||
ResourceAttributes map[string]string `yaml:"resource_attributes"`
|
||||
}
|
||||
|
||||
func (c *Config) ApplyDefaults() {
|
||||
if c.ServiceName == "" {
|
||||
c.ServiceName = "arrtrix"
|
||||
}
|
||||
if c.ResourceAttributes == nil {
|
||||
c.ResourceAttributes = map[string]string{}
|
||||
}
|
||||
}
|
||||
|
||||
func (c Config) Enabled() bool {
|
||||
return strings.TrimSpace(c.OTLPGRPCEndpoint) != ""
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue