Documentation
¶
Index ¶
- func AddUserAgentMetadata(handler, parser string)
- func ConstructParser(parserType string) (parsers.LineParser, error)
- func ConvertTypes(input map[string]interface{}) map[string]interface{}
- func GetFilterFields() []string
- func GetMatchString() string
- func GetSampleRate() uint
- func InitHoneycombFromEnvVars() error
- func WriteErrorEvent(err error, errorType string, fields map[string]interface{})
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUserAgentMetadata ¶
func AddUserAgentMetadata(handler, parser string)
AddUserAgentMetadata adds additional metadata to the user agent string
func ConstructParser ¶
func ConstructParser(parserType string) (parsers.LineParser, error)
ConstructParser accepts a parser name and attempts to build the parser, pulling additional environment variables as needed
func ConvertTypes ¶
ConvertTypes will convert strings into integer and floats if applicable
func GetFilterFields ¶
func GetFilterFields() []string
GetFilterFields returns a list of fields to be deleted from an event before it is sent to Honeycomb If FILTER_FIELDS is not set, returns an empty list.
func GetMatchString ¶
func GetMatchString() string
GetMatchString returns a string from the environment variable HONEYCOMB_EVENT_MATCH_STRINGS to use to determine HC events from an unfiltered stream
func GetSampleRate ¶
func GetSampleRate() uint
GetSampleRate returns the sample rate the configured sample rate
func InitHoneycombFromEnvVars ¶
func InitHoneycombFromEnvVars() error
InitHoneycombFromEnvVars will attempt to call libhoney.Init based on values passed to the lambda through env vars. The caller is responsible for calling libhoney.Close afterward. Will return an err if insufficient ENV vars were specified.
func WriteErrorEvent ¶
WriteErrorEvent writes the error and optional fields to the Error Dataset, if an error dataset was specified