Documentation ¶
Index ¶
- func NewOTLPExporter(config OTLP) (*otlptrace.Exporter, error)
- func NewResource(pkg, identifier string) (*resource.Resource, error)
- func NewTracerProvider(exp tracesdk.SpanExporter, res *resource.Resource) *tracesdk.TracerProvider
- func SetupTelemetry(config Config) (*tracesdk.TracerProvider, error)
- type ChildBuilder
- type Config
- type OTLP
- type Telemetry
- func (t *Telemetry) AddError(err error)
- func (t *Telemetry) AddEvent(text string, attributes ...attribute.KeyValue)
- func (t *Telemetry) ChildBuilder(attributes ...attribute.KeyValue) *ChildBuilder
- func (t *Telemetry) CreateChild(name string, attributes ...attribute.KeyValue) *Telemetry
- func (t *Telemetry) End()
- func (t *Telemetry) Fail(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOTLPExporter ¶
Creates a new OTLP exporter.
func NewResource ¶
Creates a new resource to identify the service instance.
func NewTracerProvider ¶
func NewTracerProvider(exp tracesdk.SpanExporter, res *resource.Resource) *tracesdk.TracerProvider
Creates a trace provider - an entity that manages the puts together OTel things, i.e. it essentially allows to set a "global logger" for the whole application. Under the hood it creates span processors, i.e. hooks that receive all the events and write them to the exporters (e.g. Jaeger) while associating each of them with our service.
func SetupTelemetry ¶
func SetupTelemetry(config Config) (*tracesdk.TracerProvider, error)
A simple helper that configures OpenTelemetry for the SFU.
Types ¶
type ChildBuilder ¶
type ChildBuilder struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { // Use OTLP exporter. Has precedence over the Jaeger configuration. OTLP OTLP `yaml:"otlp"` // The URL to the Jaeger instance. JaegerURL string `yaml:"jaegerUrl"` // The package name to use for the telemetry. Package string `yaml:"package"` // ID of the service instance. ID string `yaml:"id"` }
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
func NewTelemetry ¶
func (*Telemetry) ChildBuilder ¶
func (t *Telemetry) ChildBuilder(attributes ...attribute.KeyValue) *ChildBuilder
func (*Telemetry) CreateChild ¶
Click to show internal directories.
Click to hide internal directories.