huaweiapm

package module
v0.0.0-...-929ffb9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

README

huawei-apm

a Go lib to send kpi and tracing message to huawei cloud apm

Documentation

Index

Constants

View Source
const (
	DefaultDiscoveryInterval    = "290s"
	DefaultTracingBatchInterval = "1m"
	DefaultTracingBatchSize     = 1000
)
View Source
const (
	AgentVersion = "2.1.0"
)

Variables

View Source
var StartInventory = make(chan bool)
View Source
var StartKPI = make(chan bool)
View Source
var StartTracing = make(chan bool)
View Source
var StopInventory = make(chan bool)
View Source
var StopKPI = make(chan bool)
View Source
var StopTracing = make(chan bool)

Switchers

Functions

func BuildTDiscoveryInfo

func BuildTDiscoveryInfo(opts Options) (*apm.TDiscoveryInfo, error)

BuildTDiscoveryInfo create a APM instance info if you report this info to cloud, APM can discovery your process should report it every 5 mins

func GetDiscoveryInfo

func GetDiscoveryInfo() *apm.TDiscoveryInfo

func GetLocalIP

func GetLocalIP() string

GetLocalIP 获得本机IP

func NewAppID

func NewAppID(project, appName string) string

func NewRawAppID

func NewRawAppID(project, appName string) string

func NewRawResourceID

func NewRawResourceID(ports []string, podID string) string

func NewResourceID

func NewResourceID(ports []string, podID string) string

NewResourceID generate unique md5 ID for a process

func Start

func Start(opts Options) error

Types

type Options

type Options struct {

	//Inventory options
	Ports           []string
	Hostname        string
	IP              string
	Project         string
	App             string
	ServiceType     string `validate:"min=1"`
	ServiceName     string `validate:"min=1"`
	MonitoringGroup string `validate:"min=1"`
}

type TracingReporter

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

func NewTracingReporter

func NewTracingReporter(batchInterval string, batchSize int) *TracingReporter

func (*TracingReporter) StartReportSpans

func (tr *TracingReporter) StartReportSpans()

func (*TracingReporter) WriteSpan

func (tr *TracingReporter) WriteSpan(span *zipkincore.Span)

Directories

Path Synopsis
apm
pkg
thrift

Jump to

Keyboard shortcuts

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