Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateNewContextId()
- func GenerateNewId() string
- func GenerateNewTransactionId()
- func GetAwsRequestID(ctx context.Context) string
- func GetErrorMessage(err interface{}) string
- func GetErrorType(err interface{}) string
- func GetInvokedFunctionArn(ctx context.Context) string
- func GetThisProcess() *process.Process
- func GetTimestamp() int64
- type Data
- type Message
- type Plugin
Constants ¶
View Source
const ApplicationType = "go"
View Source
const AwsDefaultRegion = "AWS_DEFAULT_REGION"
AWS
View Source
const DefaultProfile = "default"
const TimeFormat = "2006-01-02 15:04:05.000 -0700"
View Source
const ThundraApplicationProfile = "thundra_applicationProfile"
Thundra Environment
Variables ¶
View Source
var ApplicationId string
View Source
var ApplicationName string
View Source
var ApplicationProfile string
View Source
var ApplicationVersion string
View Source
var ContextId string
View Source
var FunctionARN string
View Source
var LogGroupName string
View Source
var LogStreamName string
View Source
var MemorySize int
View Source
var Region string
View Source
var TransactionId string
Functions ¶
func GenerateNewContextId ¶
func GenerateNewContextId()
func GenerateNewTransactionId ¶
func GenerateNewTransactionId()
func GetAwsRequestID ¶
GetFromContext returns InvokedFunctionArn and AwsRequestID if available.
func GetErrorMessage ¶
func GetErrorMessage(err interface{}) string
GetErrorMessage returns error message
func GetErrorType ¶
func GetErrorType(err interface{}) string
GetErrorType returns type of the error
func GetInvokedFunctionArn ¶
GetFromContext returns InvokedFunctionArn and AwsRequestID if available.
func GetThisProcess ¶
GetThisProcess returns process info about this process.
Types ¶
type Data ¶
type Data interface{}
type Message ¶
type Message struct { Data Data `json:"data"` Type string `json:"type"` ApiKey string `json:"apiKey"` DataFormatVersion string `json:"dataFormatVersion"` }
Message defines the structure that given dataformat follows by Thundra. In here data could be a trace, metric or log data.
type Plugin ¶
type Plugin interface { BeforeExecution(ctx context.Context, request json.RawMessage, wg *sync.WaitGroup) AfterExecution(ctx context.Context, request json.RawMessage, response interface{}, err interface{}) ([]interface{}, string) OnPanic(ctx context.Context, request json.RawMessage, err interface{}, stackTrace []byte) ([]interface{}, string) }
Source Files
¶
- base.go
- constants.go
- message.go
- plugin.go
- util.go
Click to show internal directories.
Click to hide internal directories.