forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 104
/
observability.go
38 lines (32 loc) · 1.06 KB
/
observability.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
37
38
package config
func EnableObservability() error {
return nil
// if true {
// Temporarily disabling this until we can configure out port reuse
// fast enough or enabling observability through the config.
// Please see https://github.com/ArableProtocol/acrechain/issues/84
// return nil
// }
// pe, err := prometheus.NewExporter(prometheus.Options{
// Namespace: "acred",
// })
// if err != nil {
// return fmt.Errorf("cmd/config: failed to create the OpenCensus Prometheus exporter: %w", err)
// }
// views := app.ObservabilityViews()
// if err := view.Register(views...); err != nil {
// return fmt.Errorf("cmd/config: failed to register OpenCensus views: %w", err)
// }
// view.RegisterExporter(pe)
// mux := http.NewServeMux()
// mux.Handle("/metrics", pe)
// // TODO: Derive the Prometheus observability exporter from the Acrechain config.
// addr := ":8877"
// go func() {
// println("Serving the Prometheus observability exporter at", addr)
// if err := http.ListenAndServe(addr, mux); err != nil {
// panic(err)
// }
// }()
// return nil
}