Skip to main content

newrelic-probe

Last updated on

New Relic probe allows you to query New Relic metrics using NRQL and compare the results against specified criteria.

When to use

  • Run NRQL queries to validate transaction durations, throughput, or error counts during chaos
  • Use New Relic APM data as steady-state indicators for services under test
  • Validate that alerting thresholds in New Relic are not breached during fault injection

Prerequisites

  • An active New Relic account
  • Access to the New Relic NerdGraph API from the Kubernetes execution plane
  • A New Relic User API key for authentication
  • Proper configuration of your application to send metrics to New Relic

Steps to configure

  1. Navigate to Project Settings > Chaos Probes and click + New Probe

  2. Select APM Probe, provide a name, and select New Relic under APM Type

  3. Under Variables, define any reusable values you want to reference in probe properties or run properties. For each variable, specify the type (String or Number), name, value (fixed or runtime input), and whether it's required at runtime.

  4. Under New Relic Connector, select an existing connector or click + New Connector to create one. Provide the NerdGraph API endpoint, Account ID, and a User API key (not a License key), configure the delegate, verify the connection, and click Finish. See New Relic API keys documentation for details.

    note

    Only the NerdGraph API is supported for New Relic integration. Use https://api.newrelic.com/graphql (US) or https://api.eu.newrelic.com/graphql (EU).

  5. Under Probe Properties, configure:

    FieldDescription
    New Relic QueryNRQL query to retrieve the desired metrics.
    Example: SELECT average(duration) FROM Transaction WHERE appName = 'your-app-name' SINCE 5 minutes ago. See NRQL documentation
    New Relic Query MetricThe specific metric field to extract from the NRQL response.
    Example: average.duration (for a query using SELECT average(duration))

    Under New Relic Data Comparison, provide:

    FieldDescription
    TypeData type for comparison: Float or Int
    Comparison CriteriaComparison operator: >=, <=, ==, !=, >, <, oneOf, between
    ValueThe expected value to compare against the metric result
  6. Provide the Run Properties:

    FieldDescription
    TimeoutMaximum time for probe execution (e.g., 10s)
    IntervalTime between successive executions (e.g., 2s)
    AttemptNumber of retry attempts (e.g., 1)
    Polling IntervalTime between retries (e.g., 30s)
    Initial DelayDelay before first execution (e.g., 5s)
    VerbosityLog detail level
    Stop On Failure (optional)Stop the experiment if the probe fails
  7. Click Create Probe