-
Notifications
You must be signed in to change notification settings - Fork 211
/
main.go
36 lines (27 loc) · 1.02 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/grafana/alloy/internal/alloycli"
"github.com/grafana/alloy/internal/build"
// Register Prometheus SD components
_ "github.com/grafana/loki/v3/clients/pkg/promtail/discovery/consulagent"
_ "github.com/prometheus/prometheus/discovery/install"
// Register integrations
_ "github.com/grafana/alloy/internal/static/integrations/install"
// Embed a set of fallback X.509 trusted roots
// Allows the app to work correctly even when the OS does not provide a verifier or systems roots pool
_ "golang.org/x/crypto/x509roots/fallback"
// Embed application manifest for Windows builds
_ "github.com/grafana/alloy/internal/winmanifest"
)
func init() {
// If the build version wasn't set by the build process, we'll set it based
// on the version string in VERSION.
if build.Version == "" || build.Version == "v0.0.0" {
build.Version = fallbackVersion()
}
prometheus.MustRegister(build.NewCollector("alloy"))
}
func main() {
alloycli.Run()
}