tools: Index | Files | Directories

package ocagent

import ""

Package ocagent adds the ability to export all telemetry to an ocagent. This keeps the compile time dependencies to zero and allows the agent to have the exporters needed for telemetry aggregation and viewing systems.


Package Files

metrics.go ocagent.go

type Config Uses

type Config struct {
    Start   time.Time
    Host    string
    Process uint32
    Client  *http.Client
    Service string
    Address string
    Rate    time.Duration

func Discover Uses

func Discover() *Config

Discover finds the local agent to export to, it will return nil if there is not one running. TODO: Actually implement a discovery protocol rather than a hard coded address

type Exporter Uses

type Exporter struct {
    // contains filtered or unexported fields

func Connect Uses

func Connect(config *Config) *Exporter

Connect creates a process specific exporter with the specified serviceName and the address of the ocagent to which it will upload its telemetry.

func (*Exporter) Flush Uses

func (e *Exporter) Flush()

func (*Exporter) ProcessEvent Uses

func (e *Exporter) ProcessEvent(ctx context.Context, ev core.Event, lm label.Map) context.Context



Package ocagent imports 16 packages (graph) and is imported by 2 packages. Updated 2021-01-23. Refresh now. Tools for package owners.