monitaraexporter

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 17 Imported by: 0

README

opentelemetry-monitara-exporter-go

custom monitara exporter for opentelemetry

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIndexNamePrefixFromApiKey

func GetIndexNamePrefixFromApiKey(apikey string)

generate Documents index

func InsertBulk

func InsertBulk(es *elasticsearch.Client, spans []CustomSpan) error

Types

type CustomSpan

type CustomSpan struct {
	ActivityId string                 `json:"activityId"`
	ParentId   *string                `json:"parentId"`
	TraceId    string                 `json:"traceId"`
	SpanId     string                 `json:"spanId"`
	SourceName string                 `json:"sourceName"`
	Status     string                 `json:"status"`
	Duration   time.Duration          `json:"duration"`
	Kind       int                    `json:"kind"`
	Timestamp  time.Time              `json:"timestamp"`
	Tags       map[string]interface{} `json:"tags"`
}

type Exporter

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

Exporter is an implementation

func New

func New(hosts []string, apiKey string, maxBatchSize int, verbose bool, interval int) (*Exporter, error)

New creates an Exporter with the passed options.

func (*Exporter) ExportSpans

func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error

ExportSpans writes spans in custom format

func (*Exporter) Shutdown

func (e *Exporter) Shutdown(ctx context.Context) error

Shutdown is called to stop the exporter, it preforms no action.

Jump to

Keyboard shortcuts

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