ballerinax/newrelic Ballerina library

1.0.0

Package Overview

The New Relic Observability Extension is one of the observability extensions in the Ballerina language.

It provides an implementation for tracing and metrics and, publishing both metrics and traces to a New Relic platform.

Enabling New Relic Extension

To package the New Relic extension into the Jar, follow the following steps.

  1. Add the following import to your program.
Copy
import ballerinax/newrelic as _;
  1. Add the following to the Ballerina.toml when building your program.
Copy
[package]
org = "my_org"
name = "my_package"
version = "1.0.0"

[build-options]
observabilityIncluded=true

To enable the extension and publish traces and metrics to New Relic, add the following to the Config.toml when running your program.

Copy
[ballerina.observe]
tracingEnabled=true
tracingProvider="newrelic"
metricsEnabled=true
metricsReporter="newrelic"

[ballerinax.newrelic]
apiKey="<NEW_RELIC_LICENSE_KEY>"    # Mandatory Configuration.
tracingSamplerType="const"          # Optional Configuration. Default value is 'const'
tracingSamplerParam=1               # Optional Configuration. Default value is 1
tracingReporterFlushInterval=15000  # Optional Configuration. Default value is 15000 milliseconds
tracingReporterBufferSize=10000     # Optional Configuration. Default value is 10000
metricReporterFlushInterval=15000   # Optional Configuration. Default value is 15000 milliseconds
metricReporterClientTimeout=10000   # Optional Configuration. Default value is 10000 milliseconds

User can configure the environment variable BALLERINA_NEW_RELIC_API_KEY instead of apiKey in Config.toml. If both are configured, apiKey in Config.toml will be overwritten by the environment variable value.

Import

import ballerinax/newrelic;Copy

Metadata

Released date: 5 days ago

Version: 1.0.0


Compatibility

Platform: java21

Ballerina version: 2201.11.0

GraalVM compatible: Yes


Pull count

Total: 2018

Current verison: 0


Weekly downloads


Other versions

See more...