restqlnewrelic

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 12 Imported by: 0

README

NewRelic Plugin for RestQL

This plugin is an interface that allow RestQL to use New Relic as Application Performance Monitoring solution.

Building

To use this plugin you need the RestQL CLI tool. You can build a custom RestQL binary with this plugin using the following command:

$ RUN restQL-cli build --with github.com/wedneyyuri/restQL-plugin-newrelic@v1.1.0 --output ./restQL v6.2.0

Usage

This plugin can be configured through environment variables.

Minimal Configuration:
  • NEW_RELIC_APP_NAME: (REQUIRED) sets AppName
  • NEW_RELIC_LICENSE_KEY: (REQUIRED) sets License
Other configurations
  • NEW_RELIC_ATTRIBUTES_EXCLUDE: sets Attributes.Exclude using a comma-separated list, eg. "request.- `headers.host,request.method"
  • NEW_RELIC_ATTRIBUTES_INCLUDE: sets Attributes.Include using a comma-separated list
  • NEW_RELIC_DISTRIBUTED_TRACING_ENABLED: sets DistributedTracer.Enabled using strconv.ParseBool
  • NEW_RELIC_ENABLED: sets Enabled using strconv.ParseBool
  • NEW_RELIC_HIGH_SECURITY: sets HighSecurity using strconv.ParseBool
  • NEW_RELIC_HOST: sets Host
  • NEW_RELIC_INFINITE_TRACING_SPAN_EVENTS_QUEUE_SIZE: sets InfiniteTracing.SpanEvents.QueueSize using strconv.Atoi.
  • NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_PORT: sets InfiniteTracing.TraceObserver.Port using strconv.Atoi.
  • NEW_RELIC_INFINITE_TRACING_TRACE_OBSERVER_HOST: sets InfiniteTracing.TraceObserver.Host
  • NEW_RELIC_LABELS: sets Labels using a semi-colon delimited string of colon-separated - `pairs, eg. "Server:One;DataCenter:Primary"
  • NEW_RELIC_LOG: sets Logger to log to either "stdout" or "stderr" (filenames are not - `supported)
  • NEW_RELIC_LOG_LEVEL: controls the NEW_RELIC_LOG level, must be "debug" for debug, or - `empty for info
  • NEW_RELIC_PROCESS_HOST_DISPLAY_NAME: sets HostDisplayName
  • NEW_RELIC_SECURITY_POLICIES_TOKEN: sets SecurityPoliciesToken
  • NEW_RELIC_UTILIZATION_BILLING_HOSTNAME: sets Utilization.BillingHostname
  • NEW_RELIC_UTILIZATION_LOGICAL_PROCESSORS: sets Utilization.LogicalProcessors using strconv.Atoi.
  • NEW_RELIC_UTILIZATION_TOTAL_RAM_MIB: sets Utilization.TotalRAMMIB using strconv.Atoi.
  • NEW_RELIC_TRANSACTION_EVENTS_MAX_SAMPLES_STORED: sets TransactionEvents.MaxSamplesStored using strconv.Atoi.

License

The MIT license. See the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtraConfigFromEnvironment added in v1.3.0

func ExtraConfigFromEnvironment() newrelic.ConfigOption

func MakeNewRelicPlugin

func MakeNewRelicPlugin(logger restql.Logger) (restql.LifecyclePlugin, error)

Types

type NewRelicPlugin

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

func (*NewRelicPlugin) AfterQuery

func (n *NewRelicPlugin) AfterQuery(ctx context.Context, query string, result map[string]interface{}) context.Context

func (*NewRelicPlugin) AfterRequest

func (n *NewRelicPlugin) AfterRequest(ctx context.Context, request restql.HTTPRequest, response restql.HTTPResponse, errordetail error) context.Context

func (*NewRelicPlugin) AfterTransaction

func (*NewRelicPlugin) BeforeQuery

func (n *NewRelicPlugin) BeforeQuery(ctx context.Context, query string, queryCtx restql.QueryContext) context.Context

func (*NewRelicPlugin) BeforeRequest

func (n *NewRelicPlugin) BeforeRequest(ctx context.Context, request restql.HTTPRequest) context.Context

func (*NewRelicPlugin) BeforeTransaction

func (n *NewRelicPlugin) BeforeTransaction(ctx context.Context, tr restql.TransactionRequest) context.Context

func (*NewRelicPlugin) Name

func (n *NewRelicPlugin) Name() string

Jump to

Keyboard shortcuts

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