-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Labels
Description
Description
How can I disable "metrics" only, in order to reduce data usage.
1: I want logs enabled
2: I want crash reporting
3: all other metrics disabled (especially all automated metrics)
Please see my current config: With this config, I see non web transaction data reported on the APM dashboard.
(no sure how to inspect how much data a specific host is producing)
Below, I want to have logging and panics being recorded, and metrics disabled.
func initNewRelic() (*newrelic.Application, *telemetry.Harvester, error) {
app, err := newrelic.NewApplication(
newrelic.ConfigAppName("AppName"),
newrelic.ConfigLicense("a-license-key"),
newrelic.ConfigAppLogEnabled(true), // keep this on
newrelic.ConfigAppLogMetricsEnabled(false), // disable log metrics to reduce data sent
func(config *newrelic.Config) {
config.RuntimeSampler.Enabled = false
config.ErrorCollector.RecordPanics = true // keep this on
config.CustomInsightsEvents.Enabled = false
config.DatastoreTracer.InstanceReporting.Enabled = false
config.DatastoreTracer.DatabaseNameReporting.Enabled = false
config.DatastoreTracer.QueryParameters.Enabled = false
config.ErrorCollector.CaptureEvents = false
config.BrowserMonitoring.Enabled = false
},
newrelic.ConfigAppLogForwardingEnabled(true),
)
if err != nil {
return nil, nil, err
}
h, err := telemetry.NewHarvester(telemetry.ConfigAPIKey("license-key"),
telemetry.ConfigCommonAttributes(map[string]interface{}{
"app.name": "appName",
}),
)
if err != nil {
return nil, nil, err
}
return app, h, nil
}
Reactions are currently unavailable