newrelic

package
v0.0.0-...-8910f3d Latest Latest
Warning

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

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

README

NewRelic forwarder

This forwarder use NewRelic Log API to ship Lambda logs to NewRelic. To use this forwarder, you must first obtain a NewRelic API Key.

Configuration

Env variable Default Value Description
LS_NEWRELIC_ENABLE false Enable the newrelic forwarder
LS_NEWRELIC_LICENSE_KEY "" The NewRelic licence key to ingest the logs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NRCommon

type NRCommon struct {
	Attributes map[string]interface{} `json:"attributes"`
}

type NRDetailedLog

type NRDetailedLog struct {
	Common NRCommon `json:"common"`
	Logs   []NRLog  `json:"logs"`
}

type NRLog

type NRLog struct {
	Timestamp  int64                  `json:"timestamp"`
	Message    json.RawMessage        `json:"message"`
	Attributes map[string]interface{} `json:"attributes"`
}

type Newrelic

type Newrelic struct {
	// contains filtered or unexported fields
}

func New

func New() *Newrelic

func (*Newrelic) Init

func (s *Newrelic) Init(params forwardservice.ForwarderParams)

func (*Newrelic) IsEnable

func (s *Newrelic) IsEnable() bool

func (*Newrelic) SendLog

func (s *Newrelic) SendLog(logs []logservice.Log)

func (*Newrelic) SetupConfigs

func (s *Newrelic) SetupConfigs(app *kingpin.Application)

func (*Newrelic) Shutdown

func (s *Newrelic) Shutdown()

Jump to

Keyboard shortcuts

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