cloudwatch

package
v0.0.0-...-3594ad7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMatchingChannelID

func FindMatchingChannelID(ctx context.Context, cfg *config.Config, functionName string) (string, error)

FindMatchingChannelID finds the slack channel for the given function by longest prefix in the channel map or the default channel if no match is found

func ProcessCloudWatchLog

func ProcessCloudWatchLog(ctx context.Context, event events.CloudwatchLogsEvent, cfg *config.Config) (*LogDetails, *LogMessage, error)

Types

type LogDetails

type LogDetails struct {
	Owner         string `json:"owner"`
	Region        string `json:"region"`
	ErrorType     string `json:"errorType"`
	FunctionName  string
	LogGroupName  string `json:"logGroup"`
	LogStreamName string `json:"logStream"`
	LogStreamURL  string
}

type LogMessage

type LogMessage struct {
	Level             string  `json:"level"`
	Timestamp         float64 `json:"ts"`
	Caller            string  `json:"caller"`
	Msg               string  `json:"msg"`
	Version           string  `json:"version"`
	TenantID          string  `json:"tenantId"`
	Platform          string  `json:"platform"`
	Repo              string  `json:"repo"`
	Repository        string  `json:"repository"`
	PullRequestNumber int     `json:"pullRequestNumber"`
	CloneURL          string  `json:"cloneUrl"`
	SourceBranch      string  `json:"sourceBranch"`
	SourceCommit      string  `json:"sourceCommit"`
	TargetBranch      string  `json:"targetBranch"`
	TargetCommit      string  `json:"targetCommit"`
	NumTools          int     `json:"numTools"`
	CheckID           int     `json:"checkId"`
	Language          string  `json:"language"`
	Tools             string  `json:"tools"`
	Scanner           string  `json:"scanner"`
	Error             string  `json:"error"`
	ErrorVerbose      string  `json:"errorVerbose"`
	StdError          string  `json:"stdError"`
}

Jump to

Keyboard shortcuts

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