Documentation
¶
Index ¶
Constants ¶
const ( MeterName = "github.com/dennis-tra/nebula-crawler" TracerName = "github.com/dennis-tra/nebula-crawler" )
Variables ¶
var HealthStatus = atomic.NewBool(false)
HealthStatus is a global variable that indicates the health of the current process. This could either be "hey, I've started crawling and everything works fine" or "hey, I'm monitoring the network and all good".
Functions ¶
func ListenAndServe ¶
ListenAndServe starts an HTTP server and exposes prometheus and pprof metrics. It also exposes a health endpoint that can be probed with `nebula health`.
func NewMeterProvider ¶
func NewMeterProvider() (metric.MeterProvider, error)
NewMeterProvider initializes a new opentelemetry meter provider that exports metrics using prometheus. To serve the prometheus endpoint call ListenAndServe down below.
func NewTracerProvider ¶
NewTracerProvider initializes a new tracer provider to send traces to the given host and port combination. If any of the two values is the zero value this function will return a no-op tracer provider which effectively disables tracing.
Types ¶
This section is empty.