appinsightstrace

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInsightsCore

type AppInsightsCore struct {
	Client appinsights.TelemetryClient

	ServName string
	// contains filtered or unexported fields
}

func NewAppInsightsCore

func NewAppInsightsCore(
	optn *AppInsightsOptions,
	traceExtractor ITraceExtractor,
	lgr *zap.Logger,
) *AppInsightsCore

func (*AppInsightsCore) Close

func (insights *AppInsightsCore) Close()

func (*AppInsightsCore) ExtractTraceInfo added in v0.2.1

func (ins *AppInsightsCore) ExtractTraceInfo(
	ctx context.Context,
) (ver, tid, pid, rid, flg string)

func (*AppInsightsCore) TraceDependency added in v0.2.0

func (ins *AppInsightsCore) TraceDependency(
	ctx context.Context,
	spanId string,
	dependencyType string,
	serviceName string,
	commandName string,
	success bool,
	startTimestamp time.Time,
	eventTimestamp time.Time,
	fields map[string]string,
)

func (*AppInsightsCore) TraceDependencyWithIds added in v0.2.1

func (ins *AppInsightsCore) TraceDependencyWithIds(
	tid string,
	rid string,
	spanId string,
	dependencyType string,
	serviceName string,
	commandName string,
	success bool,
	startTimestamp time.Time,
	eventTimestamp time.Time,
	fields map[string]string,
)

func (*AppInsightsCore) TraceRequest added in v0.2.0

func (ins *AppInsightsCore) TraceRequest(
	ctx context.Context,
	method string,
	path string,
	query string,
	statusCode int,
	bodySize int,
	ip string,
	userAgent string,
	startTimestamp time.Time,
	eventTimestamp time.Time,
	fields map[string]string,
)

type AppInsightsOptions added in v0.1.1

type AppInsightsOptions struct {
	InstrumentationKey string
	ServiceName        string
}

type ITraceExtractor added in v0.2.1

type ITraceExtractor interface {
	ExtractTraceInfo(
		ctx context.Context,
	) (ver, tid, pid, rid, flg string)
}

Jump to

Keyboard shortcuts

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