Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvNrApiKey = "NEW_RELIC_API_KEY" NR_DATA_PROVIDER = "kentik" NR_USER_AGENT = "kentik-ktranslate/0.1.0" REGION_EU = "eu" REGION_US = "us" REGION_GOV = "gov" REGION_US_STAGING = "us_stage" )
Variables ¶
View Source
var ( NrUrl = "https://insights-collector.newrelic.com/v1/accounts/%s/events" NrMetricsUrl = "https://metric-api.newrelic.com/metric/v1" NrLogUrl = "https://log-api.newrelic.com/log/v1" )
View Source
var ( NrAccount = flag.String("nr_account_id", kt.LookupEnvString("NR_ACCOUNT_ID", ""), "If set, sends flow to New Relic") EstimateSize = flag.Bool("nr_estimate_only", false, "If true, record size of inputs to NR but don't actually send anything") NrRegion = flag.String("nr_region", kt.LookupEnvString("NR_REGION", ""), "NR Region to use. US|EU") NrCheckJson = flag.Bool("nr_check_json", false, "Verify body is valid json before sending on") )
Functions ¶
This section is empty.
Types ¶
type NRMetric ¶
type NRMetric struct { DeliveryErr go_metrics.Meter DeliveryWin go_metrics.Meter DeliveryMetrics go_metrics.Meter DeliveryLogs go_metrics.Meter }
type NRResponce ¶
type NRSink ¶
type NRSink struct { logger.ContextL NRAccount string NRApiKey string NRUrl string NRUrlEvent string NRUrlMetric string NRUrlLog string // contains filtered or unexported fields }
func NewSink ¶
func NewSink(log logger.Underlying, registry go_metrics.Registry, tooBig chan int, logTee chan string) (*NRSink, error)
Click to show internal directories.
Click to hide internal directories.