New Relic Component
Easily manage metrics, logs, and events
Component key: new-relic
Description
New Relic is a San Francisco, California-based technology company which develops cloud-based software to help website and application owners track the performances of their services. This component allows you to send events, logs and metrics to your New Relic Account.
Connections
API Key
After you obtain an API key from your New Relic Account Settings. The New Relic API key can be put directly into a New Relic connection.
Input | Notes | Example |
---|---|---|
API Key string / Required apiKey | Provide the API key from the developer console. | example187843230995241 |
Actions
Raw Request
Send raw HTTP request to New Relic | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Base URL string / Required baseUrl | https://api.newrelic.com/v2 | ||
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | Input the path only (/labels.json), The base URL is already included (https://api.newrelic.com/v2). For example, to connect to https://api.newrelic.com/v2/labels.json, only /labels.json is entered in this field. | /labels.json | |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. |
Send Detailed Logs
Use the Log API to send a detailed log using a custom request body to New Relic | key: sendDetailedLogs
Input | Default | Notes |
---|---|---|
Message code / Required codeMessage | Provide a JSON object containing the message of logs you want to send. | |
Connection connection / Required newRelicConnection |
Example Payload for Send Detailed Logs
{
"data": {
"requestId": "6af0a5fe-0001-b000-0000"
}
}
Send Event Data
Use the Event API to send custom event data to New Relic | key: sendEventData
Input | Notes | Example |
---|---|---|
Account Id string / Required accountId | Provide the unique identifier of your New Relic Insights account. | 8439034 |
Additional Attributes string Key Value List additionalAttributes | Provide any key value pairs to pass with your request body. | |
Event Type string / Required eventType | Can be a combination of alphanumeric characters, underscores, and colons | Purchase |
Connection connection / Required newRelicConnection |
Example Payload for Send Event Data
{
"data": {
"requestId": "6af0a5fe-0001-b000-0000"
}
}
Send Logs
Use the Log API to send log data to New Relic | key: sendLogs
Input | Notes | Example |
---|---|---|
Message string jsonMessage | Provide a JSON string containing the message of logs you want to send. | {"service-name": "my-service", "user": {"id": 123, "name": "alice"}} |
Connection connection / Required newRelicConnection | ||
Timestamp string / Required timestamp | Provide a valid UNIX timestamp to be passed alongside the logs. | 1562767499238 |
Example Payload for Send Logs
{
"data": {
"requestId": "6af0a5fe-0001-b000-0000"
}
}
Send Metric Data
Use the Metric API to send custom metrics to the New Relic | key: sendMetrics
Input | Notes | Example |
---|---|---|
Attributes string Key Value List attributes | A map of key value pairs associated with this specific metric. Values can be strings, JSON numbers, or booleans. Keys are case-sensitive and must be less than 255 characters. | memory.heap |
Metric Name string / Required metricName | Provide the name of the metric you would like to report. | memory.heap |
Metric Type string / Required metricType | Provide a string value for the type of metric you would like to report. In order to correctly chose this value refer to the list of types here: https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type/ | gauge |
Metric Value string metricValue | Provide a value to report. | 2.3 |
Connection connection / Required newRelicConnection | ||
Timestamp string / Required timestamp | Provide a valid UNIX timestamp to be passed alongside the logs. | 1562767499238 |
Example Payload for Send Metric Data
{
"data": {
"requestId": "6af0a5fe-0001-b000-0000"
}
}