plugin

package
v2.2.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TraceID string
View Source
var TransactionID string
View Source
var TriggerClassName string

Functions

func EndTimeFromContext

func EndTimeFromContext(ctx context.Context) (int64, context.Context)

func InitBaseData

func InitBaseData(ctx context.Context)

func StartTimeFromContext

func StartTimeFromContext(ctx context.Context) (int64, context.Context)

Types

type BaseDataModel

type BaseDataModel struct {
	AgentVersion              *string                 `json:"agentVersion,omitempty"`
	DataModelVersion          *string                 `json:"dataModelVersion,omitempty"`
	ApplicationID             *string                 `json:"applicationId,omitempty"`
	ApplicationInstanceID     *string                 `json:"applicationInstanceId,omitempty"`
	ApplicationDomainName     *string                 `json:"applicationDomainName,omitempty"`
	ApplicationClassName      *string                 `json:"applicationClassName,omitempty"`
	ApplicationName           *string                 `json:"applicationName,omitempty"`
	ApplicationVersion        *string                 `json:"applicationVersion,omitempty"`
	ApplicationStage          *string                 `json:"applicationStage,omitempty"`
	ApplicationRuntime        *string                 `json:"applicationRuntime,omitempty"`
	ApplicationRuntimeVersion *string                 `json:"applicationRuntimeVersion,omitempty"`
	ApplicationTags           *map[string]interface{} `json:"applicationTags,omitempty"`
}

func GetBaseData

func GetBaseData() BaseDataModel

func PrepareBaseData

func PrepareBaseData() BaseDataModel

type CompositeDataModel

type CompositeDataModel struct {
	BaseDataModel
	ID                string      `json:"id"`
	Type              string      `json:"type"`
	AllMonitoringData interface{} `json:"allMonitoringData"`
}

func PrepareCompositeData

func PrepareCompositeData(baseDataModel BaseDataModel, allData []MonitoringDataWrapper) CompositeDataModel

type Data

type Data interface{}

type MonitoringDataWrapper

type MonitoringDataWrapper struct {
	DataModelVersion string `json:"dataModelVersion"`
	Type             string `json:"type"`
	Data             Data   `json:"data"`
	APIKey           string `json:"apiKey"`
	Compressed       bool   `json:"compressed"`
}

MonitoringDataWrapper defines the structure that given dataformat follows by Thundra. In here data could be a trace, metric or log data.

func WrapMonitoringData

func WrapMonitoringData(data interface{}, dataType string) MonitoringDataWrapper

type Plugin

type Plugin interface {
	BeforeExecution(ctx context.Context, request json.RawMessage) context.Context
	AfterExecution(ctx context.Context, request json.RawMessage, response interface{}, err interface{}) ([]MonitoringDataWrapper, context.Context)
	IsEnabled() bool
	Order() uint8
}

Plugin interface provides necessary methods for the plugins to be used in thundra agent

Jump to

Keyboard shortcuts

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