tele

package
v0.0.0-...-7d840d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MeterName  = "github.com/dennis-tra/nebula-crawler"
	TracerName = "github.com/dennis-tra/nebula-crawler"
)

Variables

View Source
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

func ListenAndServe(host string, port int)

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

func NewTracerProvider(ctx context.Context, host string, port int) (trace.TracerProvider, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL