common

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func ConvertTypes(input map[string]interface{}) map[string]interface{}

ConvertTypes will convert strings into integer and floats if applicable

func GetSampleRate added in v1.5.1

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 added in v1.5.1

func WriteErrorEvent(err error, errorType string, fields map[string]interface{})

WriteErrorEvent writes the error and optional fields to the Error Dataset, if an error dataset was specified

Types

This section is empty.

Jump to

Keyboard shortcuts

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