opencensus_influxdb_exporter

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

README

opencensus-exporter-influxdb

Build Go Report Card GoDoc

InfluxDB metrics exporter for OpenCensus.io

Installation

$ go get -u github.com/starvn/opencensus-exporter-influxdb

Register

e, err := influxdb.NewExporter(influxdb.Options{
	Database: "db",
	Address:  "http://example.tld",
	Username: "user",
	Password: "password",
})
if err != nil {
	log.Fatalf("unexpected error: %s", err.Error())
}
view.RegisterExporter(e)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Ping(timeout time.Duration) (time.Duration, string, error)
	Write(bp client.BatchPoints) error
}

type IFExporter

type IFExporter struct {
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(ctx context.Context, o Options) (*IFExporter, error)

func (*IFExporter) ExportView

func (e *IFExporter) ExportView(vd *view.Data)

type Options

type Options struct {
	Address         string
	Username        string
	Password        string
	Timeout         time.Duration
	PingEnabled     bool
	Database        string
	InstanceName    string
	BufferSize      int
	ReportingPeriod time.Duration
	OnError         func(err error)
}

Jump to

Keyboard shortcuts

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